系统自带有python2.7,编译时报错

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

金桂

2018-09-09

[root@es-test-2 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 /usr/local/software/Python-3.6.5': configure: error: C compiler cannot create executables Seeconfig.log’ for more details
图片描述

写回答

2回答

一路向北

2018-09-16

//img.mukewang.com/szimg/5b9e349c000144de16160414.jpg

可以看一下视频截图标红的地方, 这里是大写的W, 而不是小写w, 其他地方保证拼写没问题 再试着编译一下.


0
0

一路向北

2018-09-10

感谢这位同学的关注,这个错误应该是对应的Python依赖包没有安装, 可以尝试安装如下依赖包
yum install epel-release -y
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel zx-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel -y

0
5
一路向北
http://img.mukewang.com/szimg/5b9e349c000144de16160414.jpg 可以看一下视频截图标红的地方, 这里是大写的W, 而不是小写w, 其他地方保证拼写没问题 再试着编译一下.
2018-09-17
共5条回复

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

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

1290 学习 · 319 问题

查看课程