PDA

View Full Version : Upgrading Perl on FreeBSD...



ProHS
02-10-2004, 03:23 PM
I tryed to upgrade Perl with FreeBSD's Port Collection by going to /usr/ports/lang/perl5/ then typing make and then make install isn't that suppose to upgrade the current perl or am i doing something wrong?

DirectAdmin Support
02-11-2004, 11:18 AM
Hello,

If you have a /usr/ports/lang/perl5.8 directory, use that instead.

John

ProHS
02-11-2004, 03:22 PM
Originally posted by DirectAdmin Support
Hello,

If you have a /usr/ports/lang/perl5.8 directory, use that instead.

John

There is not /usr/ports/lang/perl5.8/ it is just /usr/ports/lang/perl5/ which is verison perl 5.6.3 i believe but the upgrade is not showing up so am i doing it correctly?

existenz
02-11-2004, 03:33 PM
You can use sysinstall to get 5.8.1 or you need to do a ports upgrade your ports are out of date.

ProHS
02-11-2004, 03:43 PM
Well actually there nto out ofdate that just been updated to FreeBSD 4.9 and i do not really care to have 5.8.x Perl i herd issues with it so i would rather wait. I was just wondering after i upgraded through ports how coming it is not taking effect because when i use some CPAN commands to install some modules it tells me i need atleast Perl 5.6 when i have Perl 5.6.3 installed now in less i didn't upgrade it correctly. So is there a certain way to go about upgrading them?

existenz
02-11-2004, 04:29 PM
Sorry I was thinking 5.x my mistake!

Correct me if I am wrong but when you install perl it leaves the old version? I remove and reinstall when I do perl upgrades. Do a whereis perl to see if you have multiple versions. I had this happen once where it was reading the old version in usr/bin/perl

rhoekman
02-11-2004, 05:01 PM
Did you update your ports collection doing CVSup? If so after installing the new perl version you have to issue the command: use.perl port

The type perl -V to check if the version is 5.8

ProHS
02-11-2004, 06:24 PM
Yea i ran that command and it says Perl 5.00503 but when i went in the perl port and type make and then make install it installed Perl 5.6.3 so is that the correct way?

rhoekman
02-11-2004, 06:28 PM
It is the right why to install a port. Before you do make and want to make sure it is the right version do:

more distinfo

This will show the version that will be installed when you do make.

Try this for now:

pkg_add -r perl5.8

My guess is that you do not have updated your ports collection to the latest versions. See http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html to keep them up2date

ProHS
02-11-2004, 06:53 PM
Ok Perl 5.8 is installed now how would i go about to take effect because it is still showing the old Perl version.

rhoekman
02-11-2004, 06:59 PM
Did you try?

use.perl port

ProHS
02-11-2004, 07:01 PM
Yea you don't really but you can like i do, you can always just use the commands you told me. I tryed use.perl perl5.8 and it still show as me using perl 5.005_03 how wierd.

ProHS
02-11-2004, 07:09 PM
It also says when i type use.perl perl5.8

Usage:

/usr/local/bin/use.perl port -> /usr/bin/perl is the perl5 port
/usr/local/bin/use.perl system -> /usr/bin/perl is the system perl

so it is still on the old Perl.

rhoekman
02-11-2004, 07:17 PM
You are not typing the right command.

Type exactly:

use.perl port

NOT

use.perl perl5.8

What does it say when you do that?

ProHS
02-11-2004, 07:22 PM
It just goes to the next line. but when i type the one that you said was incorrect it gave me the information i showed above.

rhoekman
02-11-2004, 07:28 PM
That is ok.. No news is good news in this case. To verify that your new perl is active you type:

perl -v

You will probably see something like this:

This is perl, v5.8.2 built for i386-freebsd

Copyright 1987-2003, Larry Wall

Blablablala and then some...

If not then I have no clue ;)

ProHS
02-11-2004, 07:33 PM
oh wow it is finally installed, thanks for all your help.

ProHS
02-12-2004, 12:19 AM
Now i am getting this when clicking on "Show Installed Perl Modules"

Program Error

Details
A segmentation fault has occured

that happen after i upgraded what would cause that?

rhoekman
02-12-2004, 09:24 AM
I have no idea.. You can switch back to the old version with:

use.perl system

And see if it is related..

ProHS
02-17-2004, 02:05 AM
Yea it is 5.8.x i would recommend people stay away from 5.8x in tell they have there bugs fix in tell then i will use 5.6x well thought i would let everyone know.

existenz
02-17-2004, 11:41 AM
argh we don't have choice 5.2.x+ ...

ProHS
02-17-2004, 12:26 PM
Yes we do, all you do is just upgrade it your self through the port collection if you use FreeBSD.

existenz
02-17-2004, 03:36 PM
No its built into the tree for FreeBSD-CURRENT, Perl 5.8.2.


Sorry for the wide distribution, but it is critical that -CURRENT users
hear this. Two _MAJOR_ changes just went in to the ports tree that are
bound to cause some pain to -CURRENT users.

The first is the change in default threading libraries. The ports
system now uses -lpthread when linking ports instead of -lc_r. Binaries
that wind up with both libc_r and libpthread in them will cause
problems. In that case, it is imperative that you report this to the
port's maintainer ASAP. You can use pkg_info -W /path/to/binary to
determine which port installed it.

Second, Perl 5.8.2 is now the default version of Perl in -CURRENT since
the 5.2 split. This replaces Perl 5.6.1 as the default. Note: Perl
5.00503 is still the default version of Perl in the 4.X base OS.

If you experience problems with any of these changes (or with the other
recent changes listed in /usr/ports/CHANGES), please report them on the
ports@ list and to the appropriate maintainers as soon as possible.
Thanks.

Joe

ProHS
02-18-2004, 05:17 AM
Which version of FreeBSD are you on? Well because i know FreeBSD 4.x you can choose any version of Perl you want and i don't see FreeBSD forcing you to use any certain version of Perl on FreeBSD 5.x if so then they need to change that because that would suck. I am not going to 5.x in tell it is stable, because i believe in offer the best service as possible to my customers.

existenz
02-18-2004, 09:53 AM
Second, Perl 5.8.2 is now the default version of Perl in -CURRENT since
the 5.2 split. This replaces Perl 5.6.1 as the default. Note: Perl
5.00503 is still the default version of Perl in the 4.X base OS.

I have a 5.2.1-RC2 box that we are testing with. When 5.3 is out you will have perl 5.8.2 installed by default. It is not saying that you HAVE to use it but I am sure that you will cause all kinds of problems in the long run if you try to downgrade...

ProHS
02-18-2004, 09:58 AM
Well when FreeBSD 5.3 becomes stable i will think about upgrading in tell then i will stay away from it.