On a Mac, the standard GNU Prolog installation package puts Prolog in the /opt/local/bin
directory, which isn't normally in your path.
After installing the GNU Prolog package, open Terminal and type this command:
open -t ~/.bashrc
At the bottom of that file add this line:
export PATH="/opt/local/bin:$PATH"
then save & close the editor. Then type this command:
source ~/.bashrc
This reloads all the commands in the .bashrc
file into your current Terminal session. The next time you open Terminal you won't have to do that.
Now you should be able to start GNU Prolog by typing this command:
gprolog
The output should look like this:
GNU Prolog 1.5.0 (64 bits)
Compiled Jul 8 2021, 23:55:41 with /usr/bin/clang
Copyright (C) 1999-2021 Daniel Diaz
| ?-