gpt4 book ai didi

无法编译和运行 minisat+ sat 求解器

转载 作者:行者123 更新时间:2023-11-30 17:50:39 34 4
gpt4 key购买 nike

我在大学系使用一台 Cent0S 机器。请注意,我没有权限使用我作为 root 使用的系统。我下载了 minisat+zip file

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

make 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+ .

我使用运行它

make

make install

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

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

有人知道如何正确运行 minisat+ 吗?

最佳答案

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

<小时/>

更新:在您没有 root 访问权限的系统上安装库

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

  1. 请大学教职人员中的 IT 人员为您在计算机上安装 libgmp。这可能是最简单的方法,具体取决于系统管理员的顺从程度。

  2. 结束 Superuser is a thread discussing how to install packages a normal user 。之后,您仍然需要将库搜索路径(使用 -L 开关)添加到 minisat 包的 Makefile 中的 CFLAGS 中。

  3. 您可以像这样手动构建 libgmp:完成后,您还必须修改 minisat-Makefile,就像选项 #2 一样.

    $ 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

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

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com