开发者

How can I add a directory to the Perl library path at the system level?

开发者 https://www.devze.com 2022-12-24 08:52 出处:网络
On a standard linux set up, where can I add a directory to the @INC variable? In the /etc/profile file, I added:开发者_如何学Python

On a standard linux set up, where can I add a directory to the @INC variable?

In the /etc/profile file, I added:开发者_如何学Python

 export PERLLIB=$PERLLIB:/foo/bar
 export PERL5LIB=$PERL5LIB:/foo/bar

Thanks


If you want every Perl script to have the additional library paths, you can re-compile Perl and specify the extra directories as part of the setup. Other than that, you're stuck with the ad hoc methods as you describe.


You might also need to source your ~/.bashrc so that it rebuilds your environment, or log out and log back in, before this change takes effect. At least this would be required if you made that change in your local ~/.bash_profile instead of system wide.


Below command helps to fix this issue. use lib "/usr/print";

0

精彩评论

暂无评论...
验证码 换一张
取 消