On redhat, different users = different @INC

R

Russ

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
 
P

Paul Lalli

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
 
J

J. Gleixner

Paul said:
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
 
B

brian d foy

Russ said:
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.
 
R

Russ

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
 
M

Martijn Lievaart

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top