[英]Need help with perl error in using DBD::mysql
When I run a perl script which uses DBD::mysql , I get the error message: 当我运行使用DBD :: mysql的perl脚本时,收到错误消息:
install_driver(mysql) failed: Can't load '/home/y/lib/perl5/site_perl/5.8/i686-linux-64int/auto/DBD/mysql/mysql.so'
for module DBD::mysql: libmysqlclient.so.16: cannot open shared object file: No such file or directory
at /home/y/lib/perl5/5.8/i686-linux-64int/DynaLoader.pm line 230. at (eval 30) line 3
I am new to perl, but from what I understand it needs mysql.so and it knows the path. 我是perl的新手,但据我了解,它需要mysql.so,并且知道路径。
/home/y/lib/perl5/site_perl/5.8/i686-linux-64int/auto/DBD/mysql/mysql.so
is present. /home/y/lib/perl5/site_perl/5.8/i686-linux-64int/auto/DBD/mysql/mysql.so
存在。
Then why the problem? 那为什么会出问题呢?
The file that is missing is libmysqlclient.so.16
, not mysql.so
. 缺少的文件是libmysqlclient.so.16
,而不是mysql.so
。 It comes with the mysqlclient
package on some distributions. 它在某些发行版中带有mysqlclient
软件包。
Make sure /etc/ld.so.conf contains /usr/local/mysql/lib/mysql and /usr/local/mysql/ . 确保/etc/ld.so.conf包含/ usr / local / mysql / lib / mysql和/ usr / local / mysql /。 If not, add them and run ldconfig. 如果不是,请添加它们并运行ldconfig。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.