Hi,

I've been getting the following errors after installing DBI and DBD-mysql 
manually from source.

Can't locate DBI.pm in @INC (@INC contains: 
/etc/perl
/usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.14
/usr/share/perl/5.14
/usr/local/lib/site_perl .)

This was how I installed the DBI-1.631.

- perl Makefile.PL
- make
- make test
- make test TEST_VERBOSE=1
- make install


And this was how I installed DBD-mysql-4.027

- perl Makefile.PL = --mysql_config=/home/mysql/bin/mysql_config 
--testuser=root --testpassword=myPasswd
- make -j3
- make test
- checkinstall -D make install


I also noticed that during the completion of the installation of DBI, it 
actually installed it in the /root directory as follows:

Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/auto/DBI/Driver_xst.h
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/auto/DBI/dbipport.h
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/auto/DBI/DBI.so
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/auto/DBI/DBI.bs
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/auto/DBI/dbivport.h
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/auto/DBI/Driver.xst
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/auto/DBI/dbd_xsh.h
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/auto/DBI/dbi_sql.h
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/auto/DBI/DBIXS.h
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/auto/DBI/dbixs_rev.h
Installing /root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/dbixs_rev.pl
Installing /root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI.pm
Installing /root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/DBD.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/ProfileData.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/ProxyServer.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Profile.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/ProfileSubs.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/W32ODBC.pm
Installing /root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/FAQ.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/ProfileDumper.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Changes.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/PurePerl.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Gofer/Execute.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Gofer/Response.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Gofer/Request.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Gofer/Transport/pipeone.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Gofer/Transport/stream.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Gofer/Transport/Base.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Gofer/Serializer/DataDumper.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Gofer/Serializer/Storable.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Gofer/Serializer/Base.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Const/GetInfoReturn.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Const/GetInfoType.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Const/GetInfo/ANSI.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Const/GetInfo/ODBC.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Util/_accessor.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/Util/CacheMemory.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/SQL/Nano.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/DBD/Metadata.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/DBD/SqlEngine.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/DBD/SqlEngine/Developers.pod
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/DBD/SqlEngine/HowTo.pod
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI/ProfileDumper/Apache.pm
Installing /root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/Bundle/DBI.pm
Installing /root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/File.pm
Installing /root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/DBM.pm
Installing /root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/NullP.pm
Installing /root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Sponge.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/ExampleP.pm
Installing /root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Gofer.pm
Installing /root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Proxy.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/File/Developers.pod
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/File/Roadmap.pod
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/File/HowTo.pod
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Gofer/Transport/corostream.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Gofer/Transport/null.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Gofer/Transport/pipeone.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Gofer/Transport/stream.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Gofer/Transport/Base.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Gofer/Policy/classic.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Gofer/Policy/pedantic.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Gofer/Policy/rush.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBD/Gofer/Policy/Base.pm
Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/Win32/DBIODBC.pm
Installing /root/perl5/man/man1/dbiprof.1p
Installing /root/perl5/man/man1/dbilogstrip.1p
Installing /root/perl5/man/man1/dbiproxy.1p
Installing /root/perl5/man/man3/DBD::Gofer::Transport::pipeone.3pm
Installing /root/perl5/man/man3/DBI::DBD.3pm
Installing /root/perl5/man/man3/DBD::Gofer::Policy::pedantic.3pm
Installing /root/perl5/man/man3/DBI::SQL::Nano.3pm
Installing /root/perl5/man/man3/DBI::Const::GetInfo::ODBC.3pm
Installing /root/perl5/man/man3/DBI::PurePerl.3pm
Installing /root/perl5/man/man3/DBI::ProxyServer.3pm
Installing /root/perl5/man/man3/DBD::Gofer::Transport::null.3pm
Installing /root/perl5/man/man3/DBI::ProfileData.3pm
Installing /root/perl5/man/man3/DBD::Sponge.3pm
Installing /root/perl5/man/man3/DBD::Gofer::Policy::Base.3pm
Installing /root/perl5/man/man3/DBD::Gofer::Policy::classic.3pm
Installing /root/perl5/man/man3/DBI::Util::CacheMemory.3pm
Installing /root/perl5/man/man3/DBI::Const::GetInfoType.3pm
Installing /root/perl5/man/man3/DBI::DBD::SqlEngine::HowTo.3pm
Installing /root/perl5/man/man3/DBI::Gofer::Serializer::DataDumper.3pm
Installing /root/perl5/man/man3/DBI::Gofer::Transport::pipeone.3pm
Installing /root/perl5/man/man3/DBI::ProfileSubs.3pm
Installing /root/perl5/man/man3/DBI::DBD::Metadata.3pm
Installing /root/perl5/man/man3/DBI::Gofer::Execute.3pm
Installing /root/perl5/man/man3/DBI.3pm
Installing /root/perl5/man/man3/DBD::Gofer::Transport::Base.3pm
Installing /root/perl5/man/man3/DBI::Const::GetInfo::ANSI.3pm
Installing /root/perl5/man/man3/DBI::ProfileDumper::Apache.3pm
Installing /root/perl5/man/man3/DBD::Gofer::Transport::corostream.3pm
Installing /root/perl5/man/man3/DBI::W32ODBC.3pm
Installing /root/perl5/man/man3/DBD::File::Developers.3pm
Installing /root/perl5/man/man3/DBI::FAQ.3pm
Installing /root/perl5/man/man3/DBD::Proxy.3pm
Installing /root/perl5/man/man3/DBI::ProfileDumper.3pm
Installing /root/perl5/man/man3/Win32::DBIODBC.3pm
Installing /root/perl5/man/man3/DBD::DBM.3pm
Installing /root/perl5/man/man3/DBI::Gofer::Request.3pm
Installing /root/perl5/man/man3/DBD::File::Roadmap.3pm
Installing /root/perl5/man/man3/DBI::Profile.3pm
Installing /root/perl5/man/man3/DBI::Gofer::Transport::Base.3pm
Installing /root/perl5/man/man3/DBD::Gofer.3pm
Installing /root/perl5/man/man3/DBI::DBD::SqlEngine::Developers.3pm
Installing /root/perl5/man/man3/DBI::Gofer::Transport::stream.3pm
Installing /root/perl5/man/man3/DBD::File::HowTo.3pm
Installing /root/perl5/man/man3/Bundle::DBI.3pm
Installing /root/perl5/man/man3/DBI::Const::GetInfoReturn.3pm
Installing /root/perl5/man/man3/DBI::Gofer::Serializer::Base.3pm
Installing /root/perl5/man/man3/DBI::Gofer::Serializer::Storable.3pm
Installing /root/perl5/man/man3/DBI::DBD::SqlEngine.3pm
Installing /root/perl5/man/man3/DBD::File.3pm
Installing /root/perl5/man/man3/DBD::Gofer::Transport::stream.3pm
Installing /root/perl5/man/man3/DBI::Gofer::Response.3pm
Installing /root/perl5/man/man3/DBD::Gofer::Policy::rush.3pm
Installing /root/perl5/bin/dbiprof
Installing /root/perl5/bin/dbiproxy
Installing /root/perl5/bin/dbilogstrip


And Furthermore, I might have accidentally installed Perl twice - one manually 
from the source and the other from the Repo.

Thus, now, my DBI.pm is located in the following location:
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI.pm
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/Bundle/DBI.pm

This has affected the operation of my spamassassin, amavis and sqlgrey. All of 
them throw up a similar error

For spamassassin, the error is Can't locate DBI.pm in @INC (@INC contains: lib 
/usr/local/share/perl/5.14.2 /etc/perl /usr/local/lib/perl/5.14.2 
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 
/usr/local/lib/site_perl) at 
/usr/local/share/perl/5.14.2/Mail/SpamAssassin/SQLBasedAddrList.pm line 82.

For amavis, the error is Can't locate DBI.pm in @INC (@INC contains: lib 
/etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 
/usr/local/lib/site_perl) at 
/usr/local/share/perl/5.14.2/Mail/SpamAssassin/BayesStore/SQL.pm line 50.

Can't locate DBI.pm in @INC (@INC contains: lib /etc/perl 
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 
/usr/local/lib/site_perl) at 
/usr/local/share/perl/5.14.2/Mail/SpamAssassin/BayesStore/MySQL.pm line 51.

For sqlgrey, it is Can't locate DBI.pm in @INC (@INC contains: /etc/perl 
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 
/usr/local/lib/site_perl .) at /usr/sbin/sqlgrey line 34.
BEGIN failed--compilation aborted at /usr/sbin/sqlgrey line 34.

I was wondering if there is any way of pointing it to the right location of DBI 
and DBD-mysql so that it would be able to load the DBI.pm (without having to 
rebuild my system from scratch)

Thank you in advance

Reply via email to