linux configure报错:configure: error: cannot guess build type; you must specify one

报错:
硬件平台 飞腾d2000

[root@localhost canutils-4.0.6]# ./configure
–prefix=/opt/canutils-4.0.6/out libsocketcan_LIBS=-lsocketcan LDFLAGS=“-L/opt/libsocketcan-0
.0.11/out/lib/”
libsocketcan_CFLAGS=“-I/opt/libsocketcan-0.0.11/out/include” checking
build system type… config/autoconf/config.guess: unable to guess
system type

This script, last modified 2008-01-23, has failed to recognize the
operating system you are using. It is advised that you download the
most up to date version of the config scripts from

http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run (config/autoconf/config.guess) is already up to
date, please send the following data and any information you think
might be pertinent to config-patches@gnu.org in order to provide the
needed information to handle your system.

config.guess timestamp = 2008-01-23

uname -m = aarch64 uname -r = 5.10.147-6.PhotonLinux.preempt.aarch64
uname -s = Linux uname -v = #1 SMP PREEMPT Wed Jan 3 13:41:51 CST 2024

/usr/bin/uname -p = aarch64 /bin/uname -X =

hostinfo = /bin/universe = /usr/bin/arch -k
= /bin/arch = aarch64 /usr/bin/oslevel = /usr/convex/getsysinfo =

UNAME_MACHINE = aarch64 UNAME_RELEASE =
5.10.147-6.PhotonLinux.preempt.aarch64 UNAME_SYSTEM = Linux UNAME_VERSION = #1 SMP PREEMPT Wed Jan 3 13:41:51 CST 2024 configure:
error: cannot guess build type; you must specify one

原因:一般是由于config.guess和config.sub脚本无法识别当前的操作系统类型导致的

解决:
下载 config.guess和config.sub放到/usr

http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

然后在config的命令后面带上 --build=arm,其中平台根据自己的硬件确定
在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值