Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > On redhat, different users = different @INC

Reply
Thread Tools

On redhat, different users = different @INC

 
 
Russ
Guest
Posts: n/a
 
      08-20-2007
Hi,

We have RedHat 4EL and perl 5.8.5. Per a user's request I installed
Date:Simple, using perl -MCPAN -e shell
as the root user.
Now root can find Date::Simple, but other users cannot. They do not
want to include a lib statement in their scripts or invoke with a -I.
The @INC libraries are close, but not identical.

Does anyone know how to correct or resolve this?
Any suggestions would be appreciated.

Best regards,
Russ

 
Reply With Quote
 
 
 
 
Paul Lalli
Guest
Posts: n/a
 
      08-20-2007
On Aug 20, 3:00 pm, Russ <(E-Mail Removed)> wrote:

> We have RedHat 4EL and perl 5.8.5. Per a user's request I
> installed Date:Simple, using perl -MCPAN -e shell
> as the root user.
> Now root can find Date::Simple, but other users cannot. They
> do not want to include a lib statement in their scripts or
> invoke with a -I. The @INC libraries are close, but not
> identical.
>
> Does anyone know how to correct or resolve this?
> Any suggestions would be appreciated.


In their .profile (or .bash_profile, or whatever), set the PER5LIB
variable to the path of the installed modules.

export PERL5LIB=/path/to/modules/
or
setenv PERL5LIB /path/to/modules
(depending on the shell in use...)

Paul Lalli

 
Reply With Quote
 
 
 
 
J. Gleixner
Guest
Posts: n/a
 
      08-20-2007
Paul Lalli wrote:
> On Aug 20, 3:00 pm, Russ <(E-Mail Removed)> wrote:
>
>> We have RedHat 4EL and perl 5.8.5. Per a user's request I
>> installed Date:Simple, using perl -MCPAN -e shell
>> as the root user.
>> Now root can find Date::Simple, but other users cannot. They
>> do not want to include a lib statement in their scripts or
>> invoke with a -I. The @INC libraries are close, but not
>> identical.
>>
>> Does anyone know how to correct or resolve this?
>> Any suggestions would be appreciated.

>
> In their .profile (or .bash_profile, or whatever), set the PER5LIB
> variable to the path of the installed modules.
>
> export PERL5LIB=/path/to/modules/
> or
> setenv PERL5LIB /path/to/modules
> (depending on the shell in use...)


Also, are they using the same 'perl' as root is using?

root# which perl

someuser% which perl
 
Reply With Quote
 
brian d foy
Guest
Posts: n/a
 
      08-20-2007
In article <(E-Mail Removed) om>, Russ
<(E-Mail Removed)> wrote:

> We have RedHat 4EL and perl 5.8.5. Per a user's request I installed
> Date:Simple, using perl -MCPAN -e shell
> as the root user.
> Now root can find Date::Simple, but other users cannot. They do not
> want to include a lib statement in their scripts or invoke with a -I.
> The @INC libraries are close, but not identical.


Where did you install it? Simply being a root user doesn't mean it
installed it in the common Perl directories. The CPAN.pm config can set
options for Makefile.PL, and so on.

Have you inspected the @INC? I'd be curious to see how it differs
between users, or if this one user had puroposedly modified his @INC to
contain the libraries he knew Date::Simple would be in.

--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
Russ
Guest
Posts: n/a
 
      08-21-2007
On Aug 20, 3:00 pm, Russ <(E-Mail Removed)> wrote:
> Hi,
>
> We have RedHat 4EL and perl 5.8.5. Per a user's request I installed
> Date:Simple, using perl -MCPAN -e shell
> as the root user.
> Now root can find Date::Simple, but other users cannot. They do not
> want to include a lib statement in their scripts or invoke with a -I.
> The @INC libraries are close, but not identical.
>
> Does anyone know how to correct or resolve this?
> Any suggestions would be appreciated.
>
> Best regards,
> Russ


Thank you all for your responses. What I've found so far is
1. I searched all files in the user's directory, find . -type f -exec
grep -il PERL5LIB {} \;
Nothing. There is a .cpan directory.
2. I tested several users, including root and all resolve to the same
perl - /usr/bin/perl
3. I think CPAN.pm may be the issue. It is being installed in
directories under /root. The bulk of the other modules appear to be
under /usr/lib/perl5/5.8.5. That includes a copy of CPAN.pm.
Having never alter CPAN.pm I'm not certain what I'm looking for.
Please excuse my ignorance.

Do I hard code a value for a parameter (build_dir?) or is there a
command line override saying build it over there?

Thanks,
Russ

 
Reply With Quote
 
Martijn Lievaart
Guest
Posts: n/a
 
      08-22-2007
On Mon, 20 Aug 2007 12:00:34 -0700, Russ wrote:

> Hi,
>
> We have RedHat 4EL and perl 5.8.5. Per a user's request I installed
> Date:Simple, using perl -MCPAN -e shell as the root user.


Next time, do a 'yum install perl-Date-Simple'.

HTH,
M4
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to redirect different users to different pages? antonyliu2002@yahoo.com ASP .Net 9 03-08-2006 02:20 PM
How to Synchronize anonymous users with authenticated users using profiles? Rodusa ASP .Net 2 09-08-2005 08:12 PM
Caching Different Xml files for different users Nita Raju ASP .Net 1 12-15-2004 07:10 AM
Help me in making users/deleting users in active directory Sara rafiee ASP .Net 3 10-04-2004 01:35 PM
Reg. Listing Only Online Users in a Seperate JTree from the Total Users. Sunil Miriyala Java 0 03-01-2004 04:58 PM



Advertisments