MacOS – Run SWI Prolog through the terminal MAC

I am trying to run prolog from the terminal. I have installed version 7.2.2 and added it to my environment path using the following command:

PATH=$PATH:/Applications/SWI-Prolog.app/Contents/MacOS

Then I start typing

 swipl

But it will return this error:

Illegal instruction: 4

I am a novice, please help me. I know me You can run the application by double-clicking it, but I feel more comfortable when working in the terminal..

My Mac version is Mac OS X Lion 10.7.5(11G63)

I deleted the GUI version in my application folder. I don’t need it to run SWI-Prolog from the command line. Just go to Go to the terminal window and enter:

brew tap homebrew/x11

After executing the above command, enter:

< /p>

brew install swi-prolog --HEAD

Now swipl should work:

Maryams-MacBook-Pro:~ maryam$swipl 

Report

Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.3.3)
Copyright (c) 1990- 2015 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.

For help, use ?- help(Topic). or ?- apropos(Word).

Excellent NS! Ready to go. Let’s test it:

?- ['/Users/maryam/Downloads/familyTree.pl'].

true.

I am trying to run prolog from the terminal. I have installed version 7.2.2 and added it to my environment path using the following command:

PATH=$PATH:/Applications/SWI-Prolog.app/Contents/MacOS

Then I start typing

swipl

But it will return this error:

Illegal instruction: 4

I am a novice, please help me .I know I can run the application by double-clicking it, but I feel more comfortable when working in the terminal..

My Mac version is Mac OS X Lion 10.7.5(11G63)

I deleted the GUI version in my application folder. I don’t need it to run SWI-Prolog from the command line. Just go to the terminal window and type:

brew tap homebrew/x11

After executing the above command, enter:

brew install swi-prolog --HEAD

Now swipl should work:

Maryams-MacBook-Pro:~ maryam$swipl

return

Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.3.3)
Copyright (c) 1990-2015 University of Amsterdam, VU Amsterdam< br />SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.

For help, use ?- help(Topic). or ?- apropos(Word).

< p>Excellent! Ready to go. Let’s test it:

?- ['/Users/maryam/Downloads/familyTree.pl'].

true.

Leave a Comment

Your email address will not be published.