centos7.6 安装python3.执行/configure时,gcc异常

安装python时,执行./configure初始编译,报gcc没有工作:
错误信息:

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-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 `/opt/Python-3.6.0':
configure: error: C compiler cannot create executables

config.log信息:

图片说明

去看日志发现ld找不到 执行which ld确实找不到。
图片说明
去搜索资料,都说安装gcc即可,可是我已经把python所需的依赖全部安装了,c编译器还是没有工作,我想可能是ld问题,我在安装pydoop时也遇到ld问题,很头疼,求解!!!

/usr/bin

从其它正常机器复制文件 /etc/alternatives/ld文件,并重新做链接,如下图所示:

ln -s /etc/alternatives/ld  ld
[root@localhost bin]# ls -l ld*

ln -s /etc/alternatives/ld  ld

https://zhidao.baidu.com/question/2207002149887233948.html