0

I have just installed gnu-prolog using brew install gnu-prolog. When I try to run gprolog in the terminal I get gprolog: command not found. I tried doing the same to my other machine that is running ElCapitan and all worked perfectly.

Is there a way for me to get gprologto work for macOS Sierra?

false
  • 10,264
  • 13
  • 101
  • 209
iSebbeYT
  • 1,441
  • 2
  • 18
  • 29

3 Answers3

1

Sounds like an issue with your Homebrew installation. But you can also install GNU Prolog using MacPorts or by downloading its Mac OS X installer from its website.

Paulo Moura
  • 18,373
  • 3
  • 23
  • 33
  • 1
    Hi, yes brew did not like me having an old Xcode and the Xcode-beta simultaneously. I discovered that by simply running 'brew doctor' in terminal. I then removed Xcode and set the path to Xcode-beta as brew suggested. – iSebbeYT Sep 12 '16 at 11:41
  • Just a remark regarding your mention of MacPorts: Right now (2016 Sep 25) MacPorts cannot install gprolog on Sierra because it depends on "apple-gcc42", which currently is not supported for Sierra. No idea if there's an easy fix, I'm not very familiar with the mechanics of MacPorts. – Piotr99 Sep 25 '16 at 10:59
1

For the ones using MacPorts - you may download an installation package of gnu prolog directly from its site. It used to solve older installations issues and I have found it to solve the current one as well

use the link

http://www.gprolog.org/gprolog-1.4.4.pkg.zip

best

yehuda

Yehuda
  • 88
  • 4
1

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

| ?-
Jeff
  • 1,511
  • 2
  • 14
  • 12