Week 3 – Installing Prolog in OSX

It’s fair to say, installing Prolog in OSX is a tad tricky.

I tried installing from homebrew.

$ brew search prolog
gnu-prolog  swi-prolog

I first tried gnu-prolog but it seems the version it tries to fetch no longer exists.

A quick look on wikipedia told me that there’s not much difference between gnu-prolog and swi-prolog so i thought i’d give the latter a try. However, that one stalls on “make check” and never seems to get to the end.

So then i thought i’d try the .dmg installer found on gprolog.org. All seemed well until i tried loading up a prolog file:

$ /opt/local/bin/gprolog
GNU Prolog 1.3.1
By Daniel Diaz
Copyright (C) 1999-2009 Daniel Diaz
| ?- ['friends'].
uncaught exception: error(system_error('error trying to execute pl2wam (maybe not found)'),consult/1)

Sooooo … i give up. Now i am downloading Ubuntu which i’m going to install into a virtual machine. I’ve heard it’s a lot easier to install for Ubuntu.

If anyone knows how to install Prolog for OSX please comment below for others’ benefit!