Gossamer Forum
Home : General : Perl Programming :

changing default perl $PATH

Quote Reply
changing default perl $PATH
Hi All

We installed Mandrake 9.2, and it installs a threaded version of perl with the executable at /usr/bin/perl

Some systems that we run require a non-threaded perl.

After trying for quite a while to see if the Mandrake installation could be recompiled into a non-threaded, we decided to just leave that alone (one reason is that we messed up tons of other things along the way) and just put a second installation - non-threaded this time - with the executable at /usr/local/bin/perl (which is the default BTW).

Okay, the install went fine, and /usr/local/bin/perl is working.

However, when we do a 'which perl', we get '/usr/bin/perl'

When we do a 'whereis perl' we get:

/usr/bin/perl /usr/local/bin/perl /usr/share/man...../bz.2

Question: How can we make the /usr/local/bin/perl location the default location for the system?

We have heard that somewhere you can adjust the '$PATH', but we can't find where that is.

Apparently, /usr/bin/perl is the first in the default '$PATH'. We want to make /usr/local/bin/perl the first and /usr/bin/perl the second in the defaut path.

Thanks very much. Any help would be most appreciated.

Cheers Smile

------------------------------------------

Last edited by:

DogTags: Dec 30, 2003, 9:50 PM
Quote Reply
Re: [DogTags] changing default perl $PATH In reply to
You can add:

export PATH="/usr/local/bin:$PATH"

to your .bash_profile, but this will only be for your current login, not for all processes (i.e. apache).

Alternatively, do:

mv /usr/bin/perl /usr/bin/perl5.x.x-threaded
ln -s /usr/local/bin/perl /usr/bin/perl

to just remove the old perl, and make it so that everything uses your new perl (may break things on your system though if things required the threaded perl, or some perl libs).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] changing default perl $PATH In reply to
Thanks, Alex Smile Smile

Where do I find the .bash_profiles?

I'd like to manually see these things so that I get a better feel for the landscape.

Thanks, again Smile

------------------------------------------

Last edited by:

DogTags: Jan 9, 2004, 6:51 AM
Quote Reply
Re: [DogTags] changing default perl $PATH In reply to
Found it.....

I had to "show hidden files" in WS_FTP

http://support.ipswitch.com/kb/WS-20001229-DM04.htm

Quote:
Question/Problem: How do I see hidden files that I need to transfer?

Answer/Solution: On the remote site, under the MkDir button, locate the blank box. In the blank box type -la

Then, hit the Refresh button. This will list all files in the directory.

.bashrc

Smile

------------------------------------------

Last edited by:

DogTags: Jan 9, 2004, 7:48 AM