我使用我所在大学系中的一台Cent0S机器。请注意,我无权使用以root用户身份使用的系统。我下载了minisat+zip file

我解压缩了zip。根据我运行的安装文件


  使RX


但我有以下结果:

Makefile:96: depend.mak: No such file or directory
Making dependencies...
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
In file included from ./Main.h:23,
                 from <command-line>:0:
ADTs/Int.h:101:17: error: gmp.h: No such file or directory
make: *** [depend.mak] Error 1


我还从github下载minisat +。

我用它运行


  使





  进行安装


但我仍然有错误。
有人告诉我我需要安装gmp和gmp-devel吗?

可能有帮助:我不确定我是否以root用户身份拥有密码,因为我在大学的实验室工作。

有人能正常运行minisat +吗?

最佳答案

看起来minisat取决于GNU MP Bignum library (gmp)。您的系统上安装了libgmp吗?



更新:在您没有超级用户访问权限的系统上安装库

由于您使用的是没有root用户访问权限的大学计算机,因此有两种选择:


请大学职员中的一些IT人员为您在计算机上安装libgmp。根据系统管理员的满意程度,这可能是最简单的方法。
Superuser is a thread discussing how to install packages a normal user上。之后,您仍然必须将库搜索路径(使用-L开关)添加到minisat软件包的Makefile中的CFLAGS中。
您可以这样手动构建libgmp:
完成后,还必须像选择选项2一样修改minisat-Makefile


$ cd
$ mkdir opt/gmp

$ wget ftp://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2
$ tar -xjvf gmp-5.1.2.tar.bz2

$ cd gmp-5.1.2

$ ./configure --prefix=~/opt/gmp/ &&
$ make &&
// this will install libgmp into /home/your-login/opt/gmp/
$ make install

关于c - 无法编译和运行minisat + sat求解器,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17123403/

10-11 21:09