简体   繁体   English

配置gmp时出错

[英]Error when configuring gmp

hope this is just a very simple question.希望这只是一个非常简单的问题。 Ok, here's what I've done: I wanted to install gmp under my Linux Ubuntu 11.10.好的,这就是我所做的:我想在我的 Linux Ubuntu 11.10 下安装 gmp。 I have both g++ and gcc on my system.我的系统上有 g++ 和 gcc。 So I downloaded the latest release from the gmp official site (gmp 5.0.2), extracted it and then, since I need the c++ gmp interface, I simply run:所以我从 gmp 官方网站(gmp 5.0.2)下载了最新版本,解压出来,然后,因为我需要 c++ gmp 接口,我只需运行:

./configure --enable-cxx

But it keeps working for a while and then prints out:但它继续工作了一段时间,然后打印出来:

checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons).

Did I do something wrong?我做错什么了吗? Thank you very much!非常感谢!

Matteo马泰奥

尝试sudo apt-get install m4并重新运行./configure

I know this was from 7 years ago, but Im looking at installing gmp5.1.3 from source on an older system right now.我知道这是 7 年前的事,但我现在正在考虑在旧系统上从源代码安装 gmp5.1.3。 I noted the "funny output" checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin 5bin hunh?我注意到“有趣的输出” checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin 5bin hunh 中checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin I though it was a typo, and it probably is.我虽然这是一个错字,它可能是。 On line 27285 of configure script, there is ac_dummy="$PATH:/usr/5bin" that is a shell variable that the script then looks for and doesn't find.在配置脚本的第 27285 行上,有ac_dummy="$PATH:/usr/5bin"这是一个 shell 变量,脚本随后会查找该变量但未找到。 in the *nix default FHS, /usr/5bin doesn't exist.在 *nix 默认 FHS 中, /usr/5bin不存在。

the problem with ac_dummy="$PATH:/usr/5bin" is that the next few lines are a for loop searching the $PATH variable + /usr/5bin for m4. ac_dummy="$PATH:/usr/5bin"的问题在于接下来的几行是一个 for 循环,在 $PATH 变量 + /usr/5bin 中搜索 m4。 on my system, /usr/sbin is where the m4 files are located, and is not part of the default $PATH variable.在我的系统上,/usr/sbin 是 m4 文件所在的位置,而不是默认 $PATH 变量的一部分。

Fixes:修复:

you could modify your $PATH variable to include /usr/sbin.您可以修改 $PATH 变量以包含 /usr/sbin。

you could modify the configure script to say ac_dummy="$PATH:/usr/sbin"你可以修改配置脚本说 ac_dummy="$PATH:/usr/sbin"

you could wait 7 years for someone to file a bug report.你可能要等 7 年才能有人提交错误报告。

depending on age and support of your OS, sudo apt-get install m4 could also work.根据操作系统的年龄和支持, sudo apt-get install m4也可以工作。

我有同样的错误, sudo apt-get install m4解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM