Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If i run any of my perl script without "use lib qw( /opt/rrdtool-1.4.4/lib/perl );" after perl interpreter. I've to face the following error.

Can't locate in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .)

Its hard for me to use: "use lib qw( /opt/rrdtool-1.4.4/lib/perl );" in all of my scripts because there are hundreds of scripts. Can anyone help to resolve this....?

share|improve this question

In ubuntu systems :

sudo apt-get install librrds-perl

share|improve this answer
in debian the package is: librrdtool-oo-perl – Hayden Thring May 20 '14 at 2:41

You have a couple options: symlink the rrdtool stuff somewhere into @INC, probably /usr/lib/perl5/site_perl or set/add to the variable PERL5LIB to /opt/rrdtool-1.4.4/lib/perl. Scripts run with taint checks ignore PERL5LIB.

share|improve this answer
I've use varible PERL5LIB. I can run scrip manulay. but it does not work with cron... – User4283 Sep 17 '10 at 0:50

export PERL5LIB=${PERL5LIB}:/opt/rrdtool-1.4.4/lib/perl

share|improve this answer
Thanks,... I've done after post by embobo. export PERL5LIB=/opt/rrdtool-1.4.4/lib/perl and i've get red of the issue. – User4283 Sep 15 '10 at 5:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.