深夜去书店 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 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 关于#python#的问题:自动化测试