LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Removing Perl (https://www.linuxquestions.org/questions/linux-software-2/removing-perl-123475/)

AMMullan 12-07-2003 04:27 AM

Removing Perl
 
Hey :-)

I installed the latest version of perl tonight (from source) but I don't know how to remove perl without stuffing up ALL of the dependencies...

Basically, what i want to do is get all the dependencies to use the new version.

How would i go about doing this?

acid_kewpie 12-07-2003 09:56 AM

what did you do to install this new version?

if you already have it installed, you should NEVER just install a new one, you should UPGRADE instead:

rpm -Uvh perl.rpm this will then list and extra dependencies.

AMMullan 12-07-2003 11:11 AM

I built it from source (couldn't find an RPM for it)...

I've removed the newer version, LOL not really worth stuffing the system :D

AMMullan 12-07-2003 11:32 AM

Would a Mandrak RPM work for a Redhat system?

As this is the only RPM that i've found

tallfred 12-07-2003 01:02 PM

Both should be fine
 
Don't worry about uninstalling the old perl. The library names & module paths should include the version, so they should coexist just fine (e.g. /usr/lib/perl5/vendor_perl/5.8.0/Date/Parse.pm). Unfortnately, this also means you need to reinstall all the modules for the new version to use them. (You didn't explicitly say which versions you had, so they may be compatible.)

As for running the new perl, my RedHat 9 has perl installed in /usr/bin. This is the customary place for distribution installed binaries. Your installation from source probably went to /usr/local/bin, which frequently is listed later in the $PATH environment variable, so everyone runs the distro version. Nonetheless, most scripts encode the path of /usr/bin/perl in the first line anyway. On most systems /usr/bin/perl is a link (soft or hard) to the actual perl (e.g. /usr/bin/perl5.8.0 on redhat 9). Using ls -li /usr/bin/perl* will show they have the same i-node and thus refer to the same file contents.

To change the /usr/bin/perl link first delete it with rm. Then "ln -s /usr/local/bin/perl5.10.0 /usr/bin/perl", but you need to be root first. To restore the old hard link it would be "ln /usr/bin/perl5.8.0 /usr/bin/perl". Just remember that the arguement order for ln is the same as cp.

I suspect the symbolic link may break the security of suid perl scripts, but have not tested it.

AMMullan 12-07-2003 01:28 PM

Thanks Tallfred

Firstly, I am running v5.8.0 (standard RH9 build) and am upgrading to 5.8.2.

So when I install what would I use (not a newbie, just never upgraded Perl and am a bit nervous LOL). In the INSTALL it says sh Configure -de, make, make test, make install so should I specify a path (it installs to /usr/local/lib/perl5 as a default)...


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