转载自:https://mp.weixin.qq.com/s/cVhuibaXiCuUBTc-dX1Weg
macOS的安装
Port安装
开启浏览器输入链接 https://www.macports.org/install.php 下载当前使用的版本如下所示:
运行MacPorts-xxxxxxx.pkg安装包成功后
安装稳定版
$ sudo port install swi-prolog
Password:
Portfile changed since last build; discarding previous state.
—> Computing dependencies for swi-prolog
The following dependencies will be installed:
…
…
…
—> Some of the ports you installed have notes:
gawk has the following notes:
readline support has been removed from gawk. If you need to run gawk
interactively, install rlwrap:
sudo port install rlwrap
and run gawk using rlwrap:
rlwrap gawk ...
libpsl has the following notes:
libpsl API documentation is provided by the port ‘libpsl-docs’.
$
安装完成
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.2)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?-
安装开发板
$ sudo port install swi-prolog-devel
安装过程略 …
安装完成
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.1.15)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?-
Homebrew的安装
安装最新稳定版
$ brew install swi-prolog
Updating Homebrew…
==> Installing dependencies for swi-prolog: openssl@1.1, berkeley-db, jpeg, xz, libarchive, libyaml, pcre, readline, libtool and unixodbc
==> Installing swi-prolog dependency: openssl@1.1
…
…
…
==> libtool
In order to prevent conflicts with Apple’s own libtool we have prepended a “g”
so,you have instead:glibtool and glibtoolize.
安装完成
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.3)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?-
安装最新版
$ brew install swi-prolog --HEAD
Updating Homebrew…
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
…
…
…
==> brew cleanup
has not been run in 30 days, running now…
Removing: /usr/local/Cellar/cmake/3.15.3… (5,800 files, 53.2MB)
Pruned 0 symbolic links and 4 directories from /usr/local
==> Caveats
==> cmake
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/cmake
$
安装完成
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.1.15)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?-
Ubuntu 16.04 的安装
$ sudo apt-get install software-properties-common
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
libllvm4.0 linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic
…
…
…
Setting up swi-prolog-x (8.0.3-0-xenialppa2) …
Setting up swi-prolog (8.0.3-0-xenialppa2) …
Processing triggers for libc-bin (2.23-0ubuntu10) …
安装完成
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.3)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?-
Windwos的安装
开启浏览器输入链接https://www.swi-prolog.org/Download.html下载当前使用的版本如下所示:
这里选择Stable release
选择 SWI-Prolog 8.0.3-1 for Microsoft Windows (64 bit)
双击swipl-8.0.3-1.x64安装包
点击 “下一步”
点击“我接受”
按图选择然后点击“下一步”
点击“下一步”
点击“安装”
点击“完成”
然后运行 “CMD"
点击“确定”
键入swipl输入回车键
安装成功!
来自微信公众号:人工智能Prolog