How would be the best way to do that? Please be detailed as I am relatively new linux adminstration :)
Brian | [reply] |
First, you should find all the executables on your system named perl. The most likely places are /usr/bin/perl and /usr/local/bin/perl. Check the directories in your path (`echo $PATH`) for other executables named perl.
(If you're on Linux, you could use `locate` to find any outside your path. `locate -r /perl\$` [This will find directories named perl also.])
Once you've found all the perl executables, check their versions. /usr/bin/perl -v will tell you the version of the perl executable in /usr/bin; usr/bin/perl -V will tell you the configuration details as well, including the values in @INC. Figure out which executable is the right version and points to the right directories in @INC.
When you find the perl you want to use, let's say /usr/local/bin/perl, you probably want to rename the others. For example, if /usr/local/bin/perl is 5.6.1, and /usr/bin/perl is 5.6.0, rename /usr/bin/perl to perl5.6.0, and replace it with a link to the main perl: `ln -s /usr/local/bin/perl /usr/bin/perl`. However, you should make sure that scripts using /usr/bin/perl will continue to work after the switch to /usr/local/bin/perl. You can skip this step if you're unsure.
Now that you know you want to use /usr/local/bin/perl with the specific script that started this process, open the script in your editor and make sure the first line in #!/usr/local/bin/perl. If it's a web script, make sure your server is configured to use /usr/local/bin/perl to execute Perl scripts.
I hope that's helpful!
| [reply] |
Wow, that was incredibly helpful. I just have one last question though: If I have a link '/usr/bin/perl' that points to '/usr/local/bin/perl'. Why would I have to change my httpd.conf? Since it would still be pointing to /usr/bin/perl, wouldn't it just follow the link?
Thanks again,
Brian
| [reply] |