深夜去书店 2019-09-09 16:03 采纳率: 33.3%
浏览 1060
已采纳

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问题,很头疼,求解!!!

  • 写回答

2条回答 默认 最新

  • 深夜去书店 2019-09-12 15:22
    关注
    /usr/bin
    

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

    ln -s /etc/alternatives/ld  ld
    [root@localhost bin]# ls -l ld*
    
    ln -s /etc/alternatives/ld  ld
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog