欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

MySQL 的模块不能安装的解决方法

程序员文章站 2022-05-14 16:57:08
...

我们最常用的DBD::mysql模块,我发现是难住很多人的地方.因为安装老是失败,下面我介绍一下解决方法,比如我使用cpanm安装,有时就出/home/nue2501j/work/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.so:undefinedsymbol:DBIc_TRACE_LEVELat/usr/lib/perl5/5

我们最常用的 DBD::mysql 模块,我发现是难住很多人的地方.因为安装老是失败,下面我介绍一下解决方法,比如我使用 cpanm 安装,有时就出 /home/nue2501j/work/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: DBIc_TRACE_LEVEL at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.

如下


原文地址:http://www.sucker-fly.com/archives/562
# cpanm DBD::mysql
出错

# Tried to use 'DBD::mysql'.
# Error: Can't load '/home/nue2501j/work/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: /home/nue2501j/work/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: DBIc_TRACE_LEVEL at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
# at (eval 4) line 2
# Compilation failed in require at (eval 4) line 2.
# BEGIN failed--compilation aborted at (eval 4) line 2.
FAILED--Further testing stopped: Unable to load DBD::mysql
make: *** [test_dynamic] Error 9
解决方法

$ sudo perl -MCPAN -e shell
cpan> install Bundle::DBD::mysql
    /usr/bin/make  -- OK
    /usr/bin/make test -- OK
    /usr/bin/make install  -- OK
cpan> install DBD::mysql
DBD::mysql is up to date.