Perl's installed module isn't recognized

Discussion in 'Perl Misc' started by L. D. James, Mar 14, 2008.

  1. L. D. James

    L. D. James Guest

    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

    www.apollo3.com/~ljames
    L. D. James, Mar 14, 2008
    #1
    1. Advertising

  2. L. D. James

    smallpond Guest

    On Mar 14, 10:59 am, "L. D. James" <> 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
    > 3.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
    smallpond, Mar 14, 2008
    #2
    1. Advertising

  3. L. D. James

    Ben Morrow Guest

    Quoth "L. D. James" <>:
    >
    > 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
    Ben Morrow, Mar 14, 2008
    #3
  4. L. D. James

    L. D. James Guest

    On Mar 14, 11:22 am, smallpond <> 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

    www.apollo3.com/~ljames
    L. D. James, Mar 14, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chad
    Replies:
    3
    Views:
    398
    Kevin Spencer
    Jan 12, 2004
  2. Darren Dale
    Replies:
    2
    Views:
    285
    Darren Dale
    Jul 20, 2004
  3. blackwater dev
    Replies:
    4
    Views:
    222
    Ezra Zygmuntowicz
    Aug 2, 2005
  4. Grehom
    Replies:
    1
    Views:
    166
    Grehom
    Jun 15, 2007
  5. Albert Schlef

    Gems installed to $HOME not recognized

    Albert Schlef, Apr 2, 2010, in forum: Ruby
    Replies:
    2
    Views:
    129
    Jesper Fruergaard Andersen
    Apr 13, 2010
Loading...

Share This Page