[smokeping-users] Can't find lib.pm in @INC

Eric Chatham echatham at broadvox.net
Mon Nov 24 19:43:52 CET 2008

Hi Ged,

Thank you for your reply.  I know the basic commands in Linux.  Yes, I'm learning something new every day for it, which is a good thing.  After looking at the perl version of the server it was not the same listed in the error.  Here is my perl -V.  I'm confused too, since it looks like the list you provided.  I'm using RHEL 5.1 (CentOS).  Thanks again.

[root at hppav ~]# perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
    osname=linux, osvers=2.6.18-53.1.14.el5pae, archname=i386-linux-thread-multi
    uname='linux builder16.centos.org 2.6.18-53.1.14.el5pae #1 smp wed mar 5 12:07:47 est 2008 i686 athlon i386 gnulinux '
    config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Dversion=5.8.8 -Dmyhostname=localhost -Dperladmin=root at localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dinc_version_list=5.8.7 5.8.6 5.8.5 -Dscriptdir=/usr/bin'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='4.1.2 20071124 (Red Hat 4.1.2-42)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.5.so, so=so, useshrplib=true, libperl=libperl.so
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386
-mtune=generic -fasynchronous-unwind-tables -L/usr/local/lib'

Characteristics of this binary (from libperl):
                        USE_PERLIO USE_REENTRANT_API
  Built under linux
  Compiled at Sep 17 2008 13:37:09

Eric Chatham
Broadvox MIS Department
(216) 373-4683
echatham at broadvox.net

-----Original Message-----
From: smokeping-users-bounces at lists.oetiker.ch [mailto:smokeping-users-bounces at lists.oetiker.ch] On Behalf Of G.W. Haywood
Sent: Sunday, November 23, 2008 05:28
To: smokeping-users at lists.oetiker.ch
Subject: Re: [smokeping-users] Can't find lib.pm in @INC

Hi Eric,

On Sun, 23 Nov 2008, Eric Chatham wrote:

> I just got through re-installing the entire OS in attempt to getting
> smokeping to work.

That was a bit excessive!

> I'm determined to getting this thing working but I'm getting all
> these tiresome snags.

Tiresome snags are (only) partly because you don't understand what's
needed nor what's going on.  That's to be expected when you're new to
a fiendishly complex piece of technology like a Linux system.  But do
persevere - as you've declared you intend to - because it will start
to make sense after a while.  Unfortunately it would be rash of me
to promise that it will be a short while.  You will need patience.
But you don't need to keep reinstalling the OS, this isn't Windows.

> This is the latest error I'm getting when I try to execute the
> smokeping.cgi.  I'm still stuck at the same place I was last time
> where I was unable to view the smokeping page.
> <CODE>
> Can't locate lib.pm in @INC (@INC contains: \
> /usr/lib/perl5/5.00503/i386-linux           \
> /usr/lib/perl5/5.00503                      \
> /usr/lib/perl5/site_perl/5.005/i386-linux   \
> /usr/lib/perl5/site_perl/5.005              \
> .                                           \
> )                                           \
> at ./smokeping.cgi line 7.                  \
> BEGIN failed--compilation aborted at        \
> ./smokeping.cgi line 7.
> </CODE>

Is this version of Perl what CentOS normally supplies?!
Take a look at


for a history of Perl releases.

> lib.pm is not in any of those directories @INC.  It's here:
> /usr/lib/perl5/5.8.8/i386-linux-thread-multi/lib.pm.

The reason I said "...(only) partly because..." is that I'm a little
perplexed by your @INC paths.  In my extraordinary rendition of that
part of your message above, I've put the paths one per line (notice
that the path "." is on a line on its own for example) and the thing
that strikes me is that your Perl is getting on for ten years out of
date.  Perl 5.005 is _very_ old and I'd think really should be using
5.8.8 at least.  You'd _probably_ be safe with 5.10.0 by now although
I don't know what your distro would make of it.  If you're happy to
reinstall and entire OS just for a few Perl scripts then you might
want to consider a different one - it might be easier for you than
installing a new Perl.  Does CentOS not supply a more up-to-date Perl
in a package?  Unfortunately Smokeping may be a little sensitive to
Perl and the versions of some Perl tools and scripts.  They have an
annoying tendency to change their API with no warning, and with no
backward compatibilty.

> [snip] What else can I try?

First I think you need a system which has a reasonably modern Perl.
I'd recommend that you do nothing with anything Perlish until your
@INC contains something like this:

[ged at mail3 ged]$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Linker and Libraries:
  Dynamic Linking:

Characteristics of this binary (from libperl):
  Locally applied patches:
        REGEXP0 - fix for UTF-8 recoding in regexps - CVE-2007-5116

Note that there are a couple of paths to an OLD perl in my @INC, but
my OLD perl is way newer than 5.005_03 which I finally stopped using
(after hanging on to it for quite some time) about five years ago!
Note also that rather than upgrade Perl in its entirety for security
issues I chose to patch my existing installation.  I don't necessarily
recommend that you try to do that at this stage, it's probably simpler
for you to rely on the distro security update mechanisms.

Note also that this particular Perl is in


not in


which is because I installed it (in 2006) to replace the original Perl
on this system (5.8.0, vintage 2002) which is still there in /usr/lib
in case I get desperate.  That's pretty unlikely now, of course, I'm
just showing you that you can have more than one Perl installed if you
need to for some reason.  Unfortunately you'll probably need to gain a
bit more familiarity with your system before you'll be comfortable with
running different versions of things like Perl and libraries.

> And, what other details do you need to help?

Output of 'perl -V'?

Note that the 'V' is upper case 'V' not lower case 'v'.

> CONFIDENTIAL. This e-mail and any attached files are confidential
> and should be destroyed and/or returned if you are not the intended
> and proper recipient.

If your legal people haven't got anything better to do than spam us
all with this tripe, please get The Management to fire them.



smokeping-users mailing list
smokeping-users at lists.oetiker.ch

CONFIDENTIAL.  This e-mail and any attached files are confidential and should be destroyed and/or returned if you are not the intended and proper recipient.

More information about the smokeping-users mailing list