侧边栏壁纸
  • 累计撰写 185 篇文章
  • 累计创建 77 个标签
  • 累计收到 17 条评论

目 录CONTENT

文章目录

Linux下编译libxml2的源码报错:you must specify a host type if you use `--no-verify'

码峰
2022-09-14 / 0 评论 / 0 点赞 / 930 阅读 / 243 字 / 正在检测是否收录...
广告 广告

问题描述

在Ubuntu Linux下编译libxml2源码时,执行./configure时,报如下错误:

ltconfig: you must specify a host type if you use `--no-verify'
Try `ltconfig --help' for more information.
configure: error: libtool configure failed

其实真正有用的是下面的错误信息:

checking host system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
checking build system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized

大意是configure认不出系统的类型, 然后出现下面的 you must specify a host type.

解决方法

用 /usr/share/libtool/config.guess 覆盖 config.guess
用 /usr/share/libtool/config.sub 覆盖 config.sub

这样configure就可以猜出系统的类型了, 然后编译正常了。
部分系统版本中可能/usr/share/libtool/目录下没有config.guess和config.sub文件,可以通过find命令查找一下:

find /usr/share/ -name config.guess

比如我的系统找出来的目录是在/usr/share/misc/。

0
广告 广告

评论区