LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-24-2003, 09:00 PM   #1
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Rep: Reputation: 31
Perl script association


After trying to upgrade perl, I know have perl in 2 directories:

/usr/lib/perl5/5.8.0

and

/usr/local/lib/perl5/5.8.2

The script I'm wanting to run calls for Net::SNMP which is located in /usr/local/lib/perl5/5.8.2, but it's trying to pull up /usr/lib/perl5/5.8.0. So how do I change it so that it looks at the newer version rather then the older? I'm using Redhat 9.1. Thanks!

Mike
 
Old 11-25-2003, 08:21 AM   #2
carstenson
Member
 
Registered: Oct 2003
Location: Austin, TX
Distribution: RH 7.3, RH 9.0, FC4, Arch
Posts: 36

Rep: Reputation: 15
You _might_ be able to use rpm to remove the old perl. I don't know if other packages will require this. You can also do "find / -name perl -print" as root. Then run "/fullpath/perl -v" to get its version. My RH9 perl is in /usr/bin. Then make sure the script runs the version that you want or set your PATH to handle this.
 
Old 11-25-2003, 08:51 AM   #3
DirtDart
Member
 
Registered: Nov 2003
Distribution: Mandrake 10.1/Solaris 10 (sparc)
Posts: 96

Rep: Reputation: 16
If you need both versions of perl, you can manually tell the script where to check for the Net::SNMP:

Right after #!/usr/bin/perl (or where ever your perl binary is):

BEGIN {
unshift(@INC, "/usr/local/lib/perl5/5.8.2");
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
perl script Arnaud_B Linux - Newbie 13 07-31-2005 02:27 PM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 10:22 AM
bash script to set extension association vi0lat0r Programming 6 05-24-2004 07:04 PM
how to find the pid of a perl script from shell script toovato Linux - General 1 12-19-2003 06:25 PM
Including methods from a perl script into another perl script gene_gEnie Programming 3 01-31-2002 05:03 AM


All times are GMT -5. The time now is 03:14 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration