Activestate Perl and original Perl both on Mac OS Tiger

J

Jake Wiley

Hello,
After having problems with CPAN ,trying to install DBI-MySQL and all
that good stuff I decided to download ActiveState's perl. I used ppm
and the installs of modules went smooth. My problem is when I run perl
I'm still getting the system version (5.8.6) instead of the latest from
Activestate (5.8.7). What do I need to do to use the latest perl
executable without crashing my system.
Thanks
 
C

Chris

Jake said:
Hello,
After having problems with CPAN ,trying to install DBI-MySQL and all
that good stuff I decided to download ActiveState's perl. I used ppm
and the installs of modules went smooth. My problem is when I run perl
I'm still getting the system version (5.8.6) instead of the latest from
Activestate (5.8.7). What do I need to do to use the latest perl
executable without crashing my system.
Thanks

I'm not that familiar with OS X, but it sounds like a path problem.
You'll need to make sure that ActivePerl appears in your $PATH
environment variable sooner than your system perl.

-chris
 
A

Anno Siegel

Chris said:
I'm not that familiar with OS X, but it sounds like a path problem.
You'll need to make sure that ActivePerl appears in your $PATH
environment variable sooner than your system perl.

....and change the shebang lines in all scripts where it matters.

Anno
 
S

Sherm Pendley

Jake Wiley said:
After having problems with CPAN ,trying to install DBI-MySQL and all
that good stuff I decided to download ActiveState's perl. I used ppm
and the installs of modules went smooth. My problem is when I run perl
I'm still getting the system version (5.8.6) instead of the latest from
Activestate (5.8.7). What do I need to do to use the latest perl
executable without crashing my system.

ActivePerl installs in an out-of-the-way location to avoid conflicts with
the system Perl. You need to start your scripts with:

#!/usr/local/ActivePerl-5.8/bin/perl

sherm--
 
G

gimme_this_gimme_that

Do you have different versions of perl in /usr/bin and /usr/local/bin ?
 
G

gimme_this_gimme_that

Well no, I was thinking that the mix up in perl version is due to your
having two or three
versions of Perl around.

A perl CPAN install by default might not check which version of perl is
calling it and it
will use guess as to which version of Perl to use based upon the OS.

In your case the CPAN installed some 5.6.8 modules into a version of
Perl of a lesser
version number - so that module is hosed.

There may not be an easy workaround. You might try doing a "local"
install of the modules
and then using a PERL5LIB environment variable so Perl knows where to
go to get the
right modules. (But that doesn't help the fact that the CPAN install
gets confused.)

Sorry I can't be of more help. What, exactly, went wrong with the
DBD::MySQL build?
 
A

A. Sinan Unur

(e-mail address removed) wrote in

This is a very good example of why we try to enforce good posting in
this group. You have managed to completely lose track of who is who in
this thread.

Here is what you are replying to:

+
+ > (e-mail address removed) writes:
+ >
+ >> Do you have different versions of perl in /usr/bin and
+ >> /usr/local/bin ?
+ >
+ > Yes, I do. Why? Are you taking a survey or something?
Well no, I was thinking that the mix up in perl version is due to your
having two or three versions of Perl around.

Sherm's versions of Perl are not mixed up. It is Jake Wiley who is
having a problem with multiple versions of Perl.

You lost track of who was saying what and who had what problem because
of your habit of ignoring and failing to quote an appropriate amount of
context.
Sorry I can't be of more help.

You are not of any help.

Sinan
 
J

Jake Wiley

Thanks I'll look into the path & environment issue. I had problems
installing DBI & MYSQL because OS X Tiger does not automatically
include the necessary tools to make and complile modules. I had to
install the developer tools but it still does not complete a make file
for install.
I'm just confused because even when I'm in the activestate directory
under bin, perl still runs as 5.8.6. ????
Thanks everybody
 
G

gimme_this_gimme_that

What have you to lose by doing a clean install ?

Do a find . -name '*.pm' from / and delete all directories that have
Perl modules in them.

Then install Perl from scratch. That will definitely fix the different
versions problem.

It might take you six hours to get a clean install and DBD for MySql.
 
S

Sherm Pendley

Jake Wiley said:
I'm just confused because even when I'm in the activestate directory
under bin, perl still runs as 5.8.6. ????

The current directory "." is not in your path by default. So even if
the current directory is /usr/local/ActivePerl-5.8/bin, if you simply
run "perl", you'll get the one in /usr/bin.

If you want to run the perl in the current directory, run it as "./perl".

sherm--
 
S

Sherm Pendley

What have you to lose by doing a clean install ?

Do a find . -name '*.pm' from / and delete all directories that have
Perl modules in them.

You want to know why people are leaving usenet in droves? Idiotic advice
like this is why.

Good God no, don't do that. Dude, what's wrong with you??? This guy has
a simple question, and you're basically advising him to delete everything
and start over...
It might take you six hours to get a clean install and DBD for MySql.

It will take him six *seconds* to place the proper #! in his scripts, as
opposed to the hours it will take recovering from your idiotic "advice".

Oh, and *please* quote some of the post you're replying to. You are
*completely* lost - you not only have no idea what you're saying, you also
haven't a clue who you're saying it to or what problem they're having.

sherm--
 
S

Sherm Pendley

Well, I lead him down the path of the correct #! and asked
him how many versions of Perl he had. He can figure out
from there. So I already did that.

Quote the message you're replying to.
Yes, I'm advising him to reinstall Perl and to use just one version.

That's horrible, idiotic advice.
On typical OS X G4, an install shouldn't take more than 45
minutes.

Which is 45 completely *wasted* minutes that wouldn't need to be
spent at all, were it not for your idiotic advice.
It is not a matter of changing the path to #!.
Google DynaLoader.pm and read about many many other
Perl installs that ended up similarly hosed.

Dude - get a fsking grip already. The OP's install is not "hosed". His
scripts are using the built-in Perl. That's for one of two reasons:

a. They start with #!/usr/bin/perl, which ActivePerl
doesn't replace.

b. He's running them with "perl foo.pl", and getting /usr/bin/perl
because /usr/local/ActivePerl-5.8/bin is not in his $PATH.

In either case, the solution is simple, and doesn't involve rebuilding
Perl, reformatting the drive, or any such idiotic, destructive nonsense:

a. Replace the #! line with "#!/usr/local/ActivePerl-5.8/bin/perl".

b. Add "/usr/local/ActivePerl-5.8/bin" to $PATH.

If you spent *half* as much time reading the documentation as you did
whining about your hurt feelings, you might learn something.

sherm--
 
G

gimme_this_gimme_that

Well, I lead him down the path of the correct #! and asked
him how many versions of Perl he had. He can figure out
from there. So I already did that.

Yes, I'm advising him to reinstall Perl and to use just one version.

For one thing he says the built in perl doesn't have header files
to install modules - so what's it good for? Aside from that it's
better to used a compiled version of Perl anyway.

On typical OS X G4, an install shouldn't take more than 45
minutes.

It is not a matter of changing the path to #!.
Google DynaLoader.pm and read about many many other
Perl installs that ended up similarly hosed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
DewittMill
Top