统信UOS通过源码安装软件提示“configure: error: cannot run C compiled programs.”错误

1. 问题说明

使用源码的方式安装git软件,安装过程中出现两个错误。

  • 编译错误“cannot run C compiled programs”
XC:~/Downloads/git-2.42.1$ ./configure --prefix=/home/software/git-2.42.1
configure: Setting lib to 'lib' (the default)
configure: Will try -pthread then -lpthread to enable POSIX Threads.
configure: CHECKS for site configuration
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/home/Downloads/git-2.42.1':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
  • 无法安装错误
checking whether iconv omits bom for utf-16 and utf-32... configure: error: in `/home/Downloads/git-2.42.1':
configure: error: cannot run test program while cross compiling

2. 问题解决

  • 解决第1个错误的解决方式,在后边增加–host参数再次进行编译,编译成功。
./configure --prefix=/home/software/git-2.42.1 --host=arm
  • 解决第2个问题,需要打开系统的“安全中心-安全工具-应用安全”,将仅允许签名应用调整为允许任意应用,然后再次尝试安装即可安装成功
    在这里插入图片描述

至此安装git遇到的两个问题解决,能够正常使用了。

  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值