[SOLVED] Accidently installed two versions of swi-prolog, need help to fix it
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Accidently installed two versions of swi-prolog, need help to fix it
Alright, I have this problem where I installed two different versions of swi-prolog.
I manually installed swi-prolog (swipl) version 5.10.4 from a tar-file, which I see now is a stupid thing. (I can't remember why I did this exactly, but that is besides the point.)
Then I wanted to get the newest version of prolog, so I followed these steps:
The version of swi-prolog on my Debian Testing box is 6.4.1-3 and I only have normal Debian repos (not ppa:swi-prolog/stable). I would guess you want to remove the specific swi-prolog stable repo from your sources.list file and then remove all swi-prologs from your system. You can then reinstall swi-prolog from your normal repos and should have only the later version.
I am mystified that you get different results from
Code:
/usr/bin/swipl --version
swipl --version
What does your $PATH variable look like?
On my system I get this:
Code:
~$ swipl --version
SWI-Prolog version 6.4.1 for amd64
bash:
/opt/ros/fuerte/stacks/orocos_toolchain/install/bin:/opt/ros/fuerte/stacks/orocos_toolchain/orogen/bin:/opt/ros/fuerte/stacks/orocos_toolchain/.gems/bin:/opt/ros/fuerte/bin:/usr/lib/ccache:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/pj/ros/fuerte/tue/trunk/tue_admin_files/common_admin_files/scripts:/home/pj/ros/fuerte/tue/trunk/tue_admin_files/amigo_admin_files/scripts: No such file or directory
Firerat,
Code:
which swipl
produces the following output:
Code:
/usr/local/bin/swipl
I'm pretty sure I compiled from source.
I don't have the .tar anymore, I usually clean up my stuff after downloading.
I can probably download the tar again if I search for it..
The output of
Code:
tar -tf /path/to/prolog.tar
is:
Code:
tar: /path/to/prolog.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
So, the 5.10.4 version is in /usr/local/bin/, can't I just rm it then? Or is that not clean, e.g. does it leave obsolete files somewhere on disk?
Last edited by PJvG; 10-01-2013 at 04:20 AM.
Reason: Extra question.
For the moment you can just delete /usr/local/bin/swipl. That should be enough to guarantee that you will only run the more recent version. In the future you might consider using checkinstall if you compile your own programs. It makes uninstalling them quite easy.
Regarding
Quote:
tar -tf /path/to/prolog.tar
you weren't meant to take "path/to" literally. You were supposed to supply the actual path to where prolog.tar sits on your system.
jdk
Thanks jdk, I used the rm-command and now I get the 6.4.1 version whenever I call swipl.
Yes, I'll try to remember that.
Ah yes, I see my mistake now regarding the tar, I must've been still half-asleep..
Well, like I said, I don't have the .tar-file anymore, but I'm sure I can download it again if needed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.