LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 09-27-2013, 06:12 AM   #1
PJvG
LQ Newbie
 
Registered: Feb 2010
Location: Eindhoven, the Netherlands
Distribution: Ubuntu
Posts: 20

Rep: Reputation: 0
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:
Code:
sudo apt-add-repository ppa:swi-prolog/stable
sudo apt-get update
sudo apt-get install swi-prolog
Now if I do
Code:
swipl --version
I get
Code:
SWI-Prolog version 5.10.4 for x86_64-linux
And if I do
Code:
/usr/bin/swipl --version
I get
Code:
SWI-Prolog version 6.4.1 for amd64
I only want the 6.4.1 version on my computer.

I searched the internet for hours, but I couldn't find out how to solve the problem. (Maybe I've been searching for the wrong terms, I don't know.)

Any advice is welcome!
Thanks in advance.
 
Old 09-28-2013, 01:27 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
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
jdk
 
Old 09-28-2013, 03:11 AM   #3
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
the version from tar is probably installed in /usr/local

confirm with

Code:
which swipl
Did you compile from source, or was it a 'straight' untar ?

if you compiled do you still have the source tree?
if so, cd to it and as root
Code:
make uninstall
if it wasn't compiled ( or the above didn't work for you )
give us the output of
Code:
tar -tf /path/to/prolog.tar
with that listing we can create some kind of script to do the cleanup

Last edited by Firerat; 09-28-2013 at 03:14 AM.
 
Old 10-01-2013, 04:16 AM   #4
PJvG
LQ Newbie
 
Registered: Feb 2010
Location: Eindhoven, the Netherlands
Distribution: Ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
jdk, my $PATH variable looks like this:
Code:
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.
 
Old 10-01-2013, 07:39 AM   #5
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
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
 
Old 10-01-2013, 07:47 AM   #6
PJvG
LQ Newbie
 
Registered: Feb 2010
Location: Eindhoven, the Netherlands
Distribution: Ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
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.
 
Old 10-01-2013, 08:41 AM   #7
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Excellent! Don't forget to mark this thread as [SOLVED] (Thread Tools menu above your first post on this thread).
thanks,
jdk
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accidently installed dropbox as root walterbyrd Linux - Software 12 07-01-2013 09:51 PM
[SOLVED] -fPIC error while compiling swi-prolog on RHEL 5.4 64bit Hosferatu Linux - Software 4 10-31-2012 05:59 AM
Accidently installed kubuntu over windows 7. so sad. kipcan2 Linux - Newbie 1 08-10-2011 07:44 PM
I accidently chowned / now how to fix? linus72 Linux - Newbie 8 06-16-2009 11:11 PM
Accidently installed wrong kernel linuxmandrake Ubuntu 9 02-04-2006 12:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration