小编Ame*_*mer的帖子

如何允许非root用户使用由root安装的Perl模块?

我正在使用centos7群集,并且我使用root来安装所有必需的perl模块,但是当我以普通用户帐户检查已安装的perl模块时,没有模块列为root用户。

如何允许非root用户使用由root安装的Perl模块?

这是Perl安装目录

[root@mu ~]#  perl -e 'print join "\n", @INC'
/root/perl5/lib/perl5/x86_64-linux-thread-multi
/root/perl5/lib/perl5
/usr/local/lib64/perl5
/usr/local/share/perl5
/usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib64/perl5
/usr/share/perl5
Run Code Online (Sandbox Code Playgroud)

对于root用户

[root@mu ~]# which perl
/usr/bin/perl
Run Code Online (Sandbox Code Playgroud)

对于非root用户

[bio@mu ~]$ which perl
/bin/perl
Run Code Online (Sandbox Code Playgroud)

所有用户的perl版本是

[root@mu ~]# perl -v

This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
Run Code Online (Sandbox Code Playgroud)

对于root用户:echo $ PATH和$ PERL5LIB

[root@mu ~]# echo $PATH
/opt/software/edirect:/opt/software/BEASTv1.10.1/bin:/opt/software/genometools-1.5.9/bin:/opt/software/ncbi-blast-2.7.1+/bin:/opt/software/bedtools2/bin:/opt/intel//impi/5.0.2.044/intel64/bin:/opt/intel/composer_xe_2015.1.133/bin/intel64:/opt/intel/composer_xe_2015.1.133/debugger/gdb/intel64_mic/bin:/usr/java/jre1.8.0_151/bin:/usr/java/jre1.8.0_151/bin:/opt/tsce/maui/sbin:/opt/tsce/maui/bin:/opt/tsce/torque6/bin:/opt/tsce/torque6/sbin:/usr/local/bin:/usr/lib64/qt-3.3/bin:/root/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/ibutils/bin:.:/lustre/shared/software/maker/bin:/root/bin
[root@mu ~]#  
[root@mu ~]# echo $PERL5LIB
/root/perl5/lib/perl5:
[root@mu ~]# 
Run Code Online (Sandbox Code Playgroud)

对于非root用户:echo $ PATH和$ PERL5LIB

[bio@mu ~]$ echo $PATH
/opt/software/edirect:/opt/software/BEASTv1.10.1/bin:/opt/software/genometools-1.5.9/bin:/opt/software/ncbi-blast-2.7.1+/bin:/opt/software/bedtools2/bin:/opt/intel//impi/5.0.2.044/intel64/bin:/opt/intel/composer_xe_2015.1.133/bin/intel64:/opt/intel/composer_xe_2015.1.133/debugger/gdb/intel64_mic/bin:/usr/java/jre1.8.0_151/bin:/usr/java/jre1.8.0_151/bin:/opt/tsce/maui/sbin:/opt/tsce/maui/bin:/opt/tsce/torque6/bin:/opt/tsce/torque6/sbin:/usr/local/bin:/usr/lib64/qt-3.3/bin:/lustre/bio/perl5/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/ibutils/bin:.:/lustre/shared/software/maker/bin
[bio@mu ~]$ 
[bio@mu ~]$ echo …
Run Code Online (Sandbox Code Playgroud)

linux perl centos7

0
推荐指数
1
解决办法
91
查看次数

标签 统计

centos7 ×1

linux ×1

perl ×1