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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
04-20-2006, 12:56 PM
|
#1
|
Member
Registered: Jun 2004
Distribution: Slack
Posts: 214
Rep:
|
Perl install, two copies now?
I've just installed perl 5.8.8, thinking that it would overwrite my 5.8.7. Unfortunately it's stuck itself in another directory, so I now have two copies. As far as scripts go, that no big deal, just a bit of editing to point to the new one, but I have a couple of questions:
1. Is it OK to keep two copies on the machine, as I don't know which one is being used/updated?
2. How can I remove the old copy, just delete it?
3. I placed a $PATH entry to the 'old' perl directory, but I now need it to point to the new one. I can't find anything about how to remove an entry from $PATH. Any idea how to do that?
4. Lastly, this whole thing was brought about as I needed some modules installed as I needed the MCookie module. But I still don't have it. How can I get it?
Thanks
|
|
|
04-20-2006, 08:36 PM
|
#2
|
Member
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419
Rep:
|
1. It's normally fine to keep two versions. Frequently, this is done intentionally so that users can have the new version against which to test their scripts.
2. It depends how it was installed. If you installed it with a package manager, it would be best to remove it using the package manager. If you installed from source, it would probably be best to have an idea of the paths involved. Run perl -V for each binary and check that you are not going to be ripping out shared library directories in the course of deleting stuff.
3. That depends on your shell. A Google search on the shell and "how to change the PATH variable" will certainly lead you to the answer. For example, that search for bash netted this:
http://www.guides.sk/muo-mar02/basics/bshell5.html
4. I've not heard of MCookie. I wasn't able to find anything on it at cpan.org, either. Do you have any links/other info on this module?
|
|
|
04-21-2006, 06:20 AM
|
#3
|
Member
Registered: Jun 2004
Distribution: Slack
Posts: 214
Original Poster
Rep:
|
Thanks for the reply zaichik. I haven't had a chance to try the PATH method you linked to, but it looks good. The MCookie module turned out to be CGI::Cookie.
|
|
|
04-21-2006, 12:09 PM
|
#4
|
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,153
|
If I type which perl, I get the reply:
/usr/bin/perl
ls -al /usr/bin/perl tells me that this is actually a link to /usr/bin/perl5.8.0
So, although perl is called as perl it actually invokes /usr/bin/perl5.8.0
So, rather than trying to mess with your PATH, it is easiest to delete the link to the old perl, and make a new one to the version of perl you want to invoke. Your installer may already have done this for you, but it would be sensible to check.
This method has the advantage that if your newer version of perl doesn't work, you can easily link back to the old one.
HTH
|
|
|
04-21-2006, 07:13 PM
|
#5
|
Member
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419
Rep:
|
That is likely easier, and probably more effective than just adding a path. But don't just assume that /usr/bin/perl is only a symlink and delete it without checking, because that is not the case on all systems:
fsadmin@turin [~]# ls -la `which perl`
lrwxrwxrwx 1 root root 13 Mar 6 2005 /usr/local/bin/perl -> /usr/bin/perl*
fsadmin@turin [~]# ls -la /usr/bin/perl
-rwxr-xr-x 2 root root 942729 Apr 11 13:03 /usr/bin/perl*
|
|
|
All times are GMT -5. The time now is 10:00 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|