0

I've upgraded perl which is install in /usr/local/lib/perl5/...... Previously old version of perl was installed in /usr/lib/perl5/

Now when i installed spamassasin its locating for the old location and show the following error.

Starting spamd: Can't locate Mail/SpamAssassin.pm in @INC (@INC contains: /usr/lib/perl5/vendor_perl/5.8.8 /usr/local/lib/perl5/site_perl/5.12.3/i686-linux-thread-multi /usr/local/lib/perl5/site_perl/5.12.3 /usr/local/lib/perl5/5.12.3/i686-linux-thread-multi /usr/local/lib/perl5/5.12.3) at /usr/bin/spamd line 84. BEGIN failed--compilation aborted at /usr/bin/spamd line 84.

I've tried changing shebang from /usr/bin/perl to /usr/local/bin/perl but it did not work.

"perl -V" output.

Summary of my perl5 (revision 5 version 12 subversion 3) configuration:

Platform: osname=linux, osvers=2.6.18-238.9.1.el5, archname=i686-linux-thread-multi uname='linux nexfilter 2.6.18-238.9.1.el5 #1 smp tue apr 12 18:10:56 edt 2011 i686 i686 i386 gnulinux ' config_args='-Dusethreads -es' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-50)', 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='cc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'

Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under linux Compiled at May 13 2011 03:43:35 @INC: /usr/local/lib/perl5/site_perl/5.12.3/i686-linux-thread-multi /usr/local/lib/perl5/site_perl/5.12.3 /usr/local/lib/perl5/5.12.3/i686-linux-thread-multi /usr/local/lib/perl5/5.12.3 .

3
  • What does the commands "which perl" and "perl -V" return? (please enter without the quotation signs) May 13, 2011 at 20:07
  • This error is about missing perl module. You can try to locate the file SpamAssassin.pm. If you can't find it in the proper path, you can try re-install the module.
    – Khaled
    May 13, 2011 at 20:12
  • Khaled, I know that its due to missing perl module. It was working fine before up gradation of perl.
    – User4283
    May 13, 2011 at 20:20

1 Answer 1

1

A quick solution: make a symlink from the old directory to the new one. This will allow you to have possibly several versions of perl symlinked from /usr/local/whatever to /usr/lib/perl5.

Another solution: looks like you've recompiled perl and it chose the default prefix of /usr/local. You may try to recompile it once again, but with --prefix="/usr" given to configure script. This will put your perl into the place the rest of the system expects to find it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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