编译python3.6.5出错

来源:3-3 Ansible配合virtualenv安装配置

troylc

2018-11-06

我安装了gcc,还是报错,我的操作系统是CentOS-7-x86_64-Minimal-1804
[root@ansible Python-3.6.5]# ./configure --prefix=/usr/local --with-ensurepip=install --enable-shared LDFLAGS="-wl,-rpath /usr/local/lib"
checking build system type… x86_64-pc-linux-gnu
checking host system type… x86_64-pc-linux-gnu
checking for python3.6… no
checking for python3… no
checking for python… python
checking for --enable-universalsdk… no
checking for --with-universal-archs… no
checking MACHDEP… linux
checking for --without-gcc… no
checking for --with-icc… no
checking for gcc… gcc
checking whether the C compiler works… no
configure: error: in /root/Python-3.6.5’: configure: error: C compiler cannot create executables Seeconfig.log’ for more details
[root@ansible Python-3.6.5]# which gcc
/usr/bin/gcc
[root@ansible Python-3.6.5]# gcc --versio
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
Copyright © 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

写回答

2回答

一路向北

2018-11-07

感谢这位同学的关注,编译这部分"-wl,-rpath /usr/local/lib"如果你仔细看视频的话,里面的w为大写,建议修改这部分代码为"-Wl,-rpath /usr/local/lib"再尝试重新编译。

1
0

慕仙9828886

2020-04-26

你好 同学 我也遇到这个问题了  目前还没有解决  你解决了吗

0
0

Jenkins+Ansible+Gitlab-三剑合璧掌握自动化部署

整合三大工具解决自动化部署&持续交付问题

1290 学习 · 319 问题

查看课程