Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   Perl's installed module isn't recognized (http://www.velocityreviews.com/forums/t906775-perls-installed-module-isnt-recognized.html)

L. D. James 03-14-2008 02:59 PM

Perl's installed module isn't recognized
 
Can someone tell me what's going wrong with my perl operation? I
recently started over my Linux, Apache, Mysql, and Perl on a new hard
drive when I had a drive failure. Everything on the system is freshly
installed. At present everything works except for my scripts that
uses DBD::mysql. I used cpan to install DBD::mysql. It appears to be
installed okay, but still fail to work.

Please look at the information itemized below.

Thanks in advance for any suggestions or comments.


Simplest code to reproduce the error:

commandline: perl -MDBD::mysql -e 1
Can't load '/usr/local/lib/perl5/site_perl/5.10.0/i686-linux/auto/DBD/
mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.14: cannot
open shared object file: No such file or directory at /usr/local/lib/
perl5/5.10.0/i686-linux/DynaLoader.pm line 203.
at -e line 0
Compilation failed in require.
BEGIN failed--compilation aborted.



Attempt to install/verify module via CPAN:

cpan[1]> install DBD::mysql
CPAN: Storable loaded ok (v2.18)
Going to read /root/.cpan/Metadata
Database was generated on Fri, 14 Mar 2008 10:31:09 GMT
CPAN: YAML loaded ok (v0.65)
DBD::mysql is up to date (4.006).



Perl's Search Path:

commandline: perl -e "print qq(@INC)" | sed "s/ /\n/g"
/usr/local/lib/perl5/5.10.0/i686-linux
/usr/local/lib/perl5/5.10.0
/usr/local/lib/perl5/site_perl/5.10.0/i686-linux
/usr/local/lib/perl5/site_perl/5.10.0
/usr/local/lib/perl5/site_perl/5.8.8
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl



Location of installed mysql files from the /usr/local/lib hierarchy:

commandline: find -name mysql\*
../site_perl/5.8.8/i686-linux/Bundle/DBD/mysql.pm
../site_perl/5.8.8/i686-linux/DBD/mysql
../site_perl/5.8.8/i686-linux/DBD/mysql.pm
../site_perl/5.8.8/i686-linux/auto/DBD/mysql
../site_perl/5.8.8/i686-linux/auto/DBD/mysql/mysql.bs
../site_perl/5.8.8/i686-linux/auto/DBD/mysql/mysql.so
../site_perl/5.8.8/CGI/Session/Driver/mysql.pm
../site_perl/5.10.0/i686-linux/Bundle/DBD/mysql.pm
../site_perl/5.10.0/i686-linux/DBD/mysql
../site_perl/5.10.0/i686-linux/DBD/mysql.pm
../site_perl/5.10.0/i686-linux/auto/DBD/mysql
../site_perl/5.10.0/i686-linux/auto/DBD/mysql/mysql.bs
../site_perl/5.10.0/i686-linux/auto/DBD/mysql/mysql.so
../site_perl/5.6.1/i686-linux/Bundle/DBD/mysql.pm
../site_perl/5.6.1/i686-linux/DBD/mysql
../site_perl/5.6.1/i686-linux/DBD/mysql.pod
../site_perl/5.6.1/i686-linux/DBD/mysql.pm
../site_perl/5.6.1/i686-linux/auto/DBD/mysql
../site_perl/5.6.1/i686-linux/auto/DBD/mysql/mysql.bs
../site_perl/5.6.1/i686-linux/auto/DBD/mysql/mysql.so

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames

smallpond 03-14-2008 03:22 PM

Re: Perl's installed module isn't recognized
 
On Mar 14, 10:59 am, "L. D. James" <lja...@apollo3.com> wrote:
> Can someone tell me what's going wrong with my perl operation? I
> recently started over my Linux, Apache, Mysql, and Perl on a new hard
> drive when I had a drive failure. Everything on the system is freshly
> installed. At present everything works except for my scripts that
> uses DBD::mysql. I used cpan to install DBD::mysql. It appears to be
> installed okay, but still fail to work.
>
> Please look at the information itemized below.
>
> Thanks in advance for any suggestions or comments.
>
> Simplest code to reproduce the error:
>
> commandline: perl -MDBD::mysql -e 1
> Can't load '/usr/local/lib/perl5/site_perl/5.10.0/i686-linux/auto/DBD/
> mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.14: cannot
> open shared object file: No such file or directory at /usr/local/lib/
> perl5/5.10.0/i686-linux/DynaLoader.pm line 203.
> at -e line 0
> Compilation failed in require.
> BEGIN failed--compilation aborted.
>
> Attempt to install/verify module via CPAN:
>
> cpan[1]> install DBD::mysql
> CPAN: Storable loaded ok (v2.18)
> Going to read /root/.cpan/Metadata
> Database was generated on Fri, 14 Mar 2008 10:31:09 GMT
> CPAN: YAML loaded ok (v0.65)
> DBD::mysql is up to date (4.006).
>
> Perl's Search Path:
>
> commandline: perl -e "print qq(@INC)" | sed "s/ /\n/g"
> /usr/local/lib/perl5/5.10.0/i686-linux
> /usr/local/lib/perl5/5.10.0
> /usr/local/lib/perl5/site_perl/5.10.0/i686-linux
> /usr/local/lib/perl5/site_perl/5.10.0
> /usr/local/lib/perl5/site_perl/5.8.8
> /usr/local/lib/perl5/site_perl/5.6.1
> /usr/local/lib/perl5/site_perl
>
> Location of installed mysql files from the /usr/local/lib hierarchy:
>
> commandline: find -name mysql\*
> ./site_perl/5.8.8/i686-linux/Bundle/DBD/mysql.pm
> ./site_perl/5.8.8/i686-linux/DBD/mysql
> ./site_perl/5.8.8/i686-linux/DBD/mysql.pm
> ./site_perl/5.8.8/i686-linux/auto/DBD/mysql
> ./site_perl/5.8.8/i686-linux/auto/DBD/mysql/mysql.bs
> ./site_perl/5.8.8/i686-linux/auto/DBD/mysql/mysql.so
> ./site_perl/5.8.8/CGI/Session/Driver/mysql.pm
> ./site_perl/5.10.0/i686-linux/Bundle/DBD/mysql.pm
> ./site_perl/5.10.0/i686-linux/DBD/mysql
> ./site_perl/5.10.0/i686-linux/DBD/mysql.pm
> ./site_perl/5.10.0/i686-linux/auto/DBD/mysql
> ./site_perl/5.10.0/i686-linux/auto/DBD/mysql/mysql.bs
> ./site_perl/5.10.0/i686-linux/auto/DBD/mysql/mysql.so
> ./site_perl/5.6.1/i686-linux/Bundle/DBD/mysql.pm
> ./site_perl/5.6.1/i686-linux/DBD/mysql
> ./site_perl/5.6.1/i686-linux/DBD/mysql.pod
> ./site_perl/5.6.1/i686-linux/DBD/mysql.pm
> ./site_perl/5.6.1/i686-linux/auto/DBD/mysql
> ./site_perl/5.6.1/i686-linux/auto/DBD/mysql/mysql.bs
> ./site_perl/5.6.1/i686-linux/auto/DBD/mysql/mysql.so
>
> -- L. James
>
> --
> L. D. James
> lja...@apollo3.comwww.apollo3.com/~ljames



Your perl is OK. It needs to interface to the mysql library
which is part of mysql.
On my system, this is loaded by the mysql-libs rpm.

rpm -qf /usr/lib/mysql/libmysqlclient.so.15
mysql-libs-5.0.45-6.fc8
--S

Ben Morrow 03-14-2008 03:36 PM

Re: Perl's installed module isn't recognized
 

Quoth "L. D. James" <ljames@apollo3.com>:
>
> commandline: perl -MDBD::mysql -e 1
> Can't load '/usr/local/lib/perl5/site_perl/5.10.0/i686-linux/auto/DBD/
> mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.14: cannot
> open shared object file: No such file or directory at /usr/local/lib/
> perl5/5.10.0/i686-linux/DynaLoader.pm line 203.


Either you don't have the MySQL client libraries installed, or your
dynamic loader doesn't know how to find them. If they aren't installed,
install them; if they are, check your /etc/ld.so.conf and make sure
you've run ldconfig.

It's a little weird that CPAN let you install DBD::mysql, since
presumably its tests didn't pass: did CPAN run the tests and somehow
they passed, or did you have to force the install? Or did you install
using your system's package manager, and it failed to install the
required libraries first? Or did you install manually, and not run the
tests?

Ben


L. D. James 03-14-2008 04:13 PM

Re: Perl's installed module isn't recognized
 
On Mar 14, 11:22 am, smallpond <smallp...@juno.com> wrote:
> Your perl is OK. It needs to interface to the mysql library
> which is part of mysql.
> On my system, this is loaded by the mysql-libs rpm.
>
> rpm -qf /usr/lib/mysql/libmysqlclient.so.15
> mysql-libs-5.0.45-6.fc8
> --S


Thanks guys. I had pounder this problem for hours since yesterday. I
couldn't figure it out. You pointed me to the right direction. I
reinstalled an older version of mysql 4.1.22, then my scripts started
working. I installed the later version on top of the older version,
mysql 5.1.23 and it continues to work.

I see what causes the problem was, in the process of fixing a
different problem, I thought it we because of some compatibilities of
the newest mysql, so I downgraded. When that didn't fix the problem
of the other program, I removed the downgrade and upgraded again. I
guess somewhere down the line of having the older version installed,
the module had configured itself for that library.

Thank you kindly for your fast responses.

I'll experiment later with how to reconfigure the modules to use the
later version install.

When doing my file search I should have searched for libmysqlclient.so
\* rather than searching for mysql\*. This would have showed me
libmysqlclient.so.16, which may have given me the clue to reinstall
the older version. After the reinstall of the older version I have
both libmysqlclient.so.14 (which it looks for) and libmysqlclient.so.
16.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames


All times are GMT. The time now is 08:55 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.