在 Linux 上安装 SWI-Prolog 时遇到问题
Having touble installing SWI-Prolog on Linux
我正在按照 SWI-Prolog 网站上的安装说明进行操作。我在 Linux 机器上。
首先,我 git-clone repo 和 cd 到 swipl-devel。
接下来我运行命令:
git submodule update --init
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX="${install_under}/swipl" -G Ninja ..
ninja
一切顺利。
接下来,当我运行ctest -j 4
回来的时候:
98% tests passed, 1 tests failed out of 66
Total Test time (real) = 15.23 sec
The following tests FAILED:
24 - swipl:xsb/nonmt_tests (Failed)
Errors while running CTest
然后我成为 root 和 运行 ninja install
。这是我得到的结果:
[12/13] Install the project...
-- Install configuration: "RelWithDebInfo"
-- Set runtime path of "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/bin/x86_64-linux/swipl" to "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux"
-- Set runtime path of "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux/libswipl.so.8.3.6" to "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux"
-- Set runtime path of "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/bin/x86_64-linux/swipl-ld" to "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux"
CMake Error at src/cmake_install.cmake:509 (EXECUTE_PROCESS):
EXECUTE_PROCESS given unknown argument "command".
Call Stack (most recent call first):
cmake_install.cmake:70 (include)
FAILED: CMakeFiles/install.util
cd /home/nick/prolog/swipl-devel/build && /usr/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.
我不确定我错过了什么。
确实出了点问题。
我从未遇到过 swipl:xsb/nonmt_tests
测试失败的情况(无论它们是什么)。
shell 变量 install_under
是否正确设置 运行 以上?
例如,我总是安装在/usr/local/logic/swipl
这样的目录下,所以这里你必须说
-DCMAKE_INSTALL_PREFIX=/usr/local/logic/swipl
或
export install_under=/usr/local/logic/
你的情况(不确定是否需要导出,它设置了一个环境变量)。
我正在按照 SWI-Prolog 网站上的安装说明进行操作。我在 Linux 机器上。
首先,我 git-clone repo 和 cd 到 swipl-devel。
接下来我运行命令:
git submodule update --init
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX="${install_under}/swipl" -G Ninja ..
ninja
一切顺利。
接下来,当我运行ctest -j 4
回来的时候:
98% tests passed, 1 tests failed out of 66
Total Test time (real) = 15.23 sec
The following tests FAILED:
24 - swipl:xsb/nonmt_tests (Failed)
Errors while running CTest
然后我成为 root 和 运行 ninja install
。这是我得到的结果:
[12/13] Install the project...
-- Install configuration: "RelWithDebInfo"
-- Set runtime path of "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/bin/x86_64-linux/swipl" to "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux"
-- Set runtime path of "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux/libswipl.so.8.3.6" to "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux"
-- Set runtime path of "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/bin/x86_64-linux/swipl-ld" to "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux"
CMake Error at src/cmake_install.cmake:509 (EXECUTE_PROCESS):
EXECUTE_PROCESS given unknown argument "command".
Call Stack (most recent call first):
cmake_install.cmake:70 (include)
FAILED: CMakeFiles/install.util
cd /home/nick/prolog/swipl-devel/build && /usr/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.
我不确定我错过了什么。
确实出了点问题。
我从未遇到过 swipl:xsb/nonmt_tests
测试失败的情况(无论它们是什么)。
shell 变量 install_under
是否正确设置 运行 以上?
例如,我总是安装在/usr/local/logic/swipl
这样的目录下,所以这里你必须说
-DCMAKE_INSTALL_PREFIX=/usr/local/logic/swipl
或
export install_under=/usr/local/logic/
你的情况(不确定是否需要导出,它设置了一个环境变量)。