On Wed Jan 14 2009 @ 8:17, dolphin_sonar wrote:
> Hi,
>
> I bought the O'Reilly 5th edition Learning Perl the other day and it's
> great. I am new to programming and Perl as well. I do know my way
> around Linux but I am having problems upgrading from the version that
> was on my OS (Cent OS 5.2) to 5.10. I downloaded Perl 5.10 from
> http://www.cpan.org/authors/id/R/RG/RGARCIA/perl-5.10.0.tar.gz, then
> tar -xvzf perl-5.10.0.tar.gz the package in /usr/local/bin I then
> followed the README guide that said to:
>
> ./Configure -des -Dprefix=$HOME/localperl
> make test
> make install
>
> Now, the first command was probably my mistake because I really have
> no idea what that would do.
In -Dprefix=$HOME/localperl, the variable $HOME is what you're not getting,
I think. That configuration line means "build a new installation of Perl in
my home directory and put it all into a folder called localperl."
(Normally, the build would get put into the directory you choose, but then
into bin/, lib, share/ and man/ directories there.)
> I've also noticed that now there's a perl5.10.0 located in the /root/
> localperl/bin so I am sure it has something to do with the
> above .Configure command. Can anyone give me some advice on how to get
> 5.10 working? I feel like I am close, but nothing so far.
Apparently, you were logged in as root when you built and installed this
version of Perl. That was a mistake. You should be root as little as
possible. (I can tell you were root since $HOME for root = /root. You
configured it to be built in $HOME/localperl and it was.)
In any case, I would recommend that you remove entirely the localperl/
directory in your root home directory, and then start again. Download the
latest sources as a regular user, in your regular user's $HOME. Then build
it and install it there. After that you should be able to invoke it with
this shebang line:
#!/home/username/localperl/bin/perl
Hope this helps, T
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/