[英]Symbol lookup error undefined symbol: mysql_init
When I am trying the below perl scrip, I am getting the "perl:symbol lookup error". 当我尝试下面的perl脚本时,出现“ perl:symbol查找错误”。 It looks if I modify the PATH currently I could have resolve the issue.
它看起来是否可以在当前修改PATH的情况下解决问题。 But I am not sure what lib I should bring to the PATH.
但是我不确定应该把什么库带到PATH。 Please let me know how do I resolve this and feel free to share if you have any different solutions or workarounds to this issue.
如果您对此问题有其他解决方案或解决方法,请告诉我如何解决,并随时与大家分享。
[root@localhost]# ./create_defs.pl --user root --password amma --db=d1 --table=tbl1
**perl: symbol lookup error: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so: undefined symbol: mysql_init**
[root@localhost]# ll /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so
-r-xr-xr-x 1 root root 333965 Sep 12 13:05 /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so
[root@localhost]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/mysql/bin:/root/bin
From comment 来自评论
Here is the perl version in my server, so how do I resolve this issue? 这是服务器中的perl版本,那么如何解决此问题?
[root@localhost lib]# perl -v
This is perl, v5.8.8 built for x86_64-linux-thread-multi
From comment 来自评论
Thank you for responding. 感谢您的回应。 Following are the commands I used to do the installation
以下是我用来进行安装的命令
perl -MCPAN -e 'install Bundle::DBI'
perl -MCPAN -e 'install DBD::mysql'
perl -MCPAN -e 'install Bundle::DBD::mysql'
perl -MCPAN -e 'DBI' perl -MCPAN -e 'DBD::mysql'
perl -MCPAN -e 'install perl-DBD-MySQL'
install Bundle::Mysql
Following are the commands I used, can you please guide me how to clear all the perl module and do the reinstallation. 以下是我使用的命令,能否请您指导我如何清除所有perl模块并重新安装。
This isn't a standard Perl error message but reflects a problem with your perl installation. 这不是标准的Perl错误消息,但反映出您的Perl安装存在问题。
You have multiple different builds of perl that aren't playing nice. 您有多个不同版本的perl,表现不佳。
Without being able to delve into your system the best advice I can give is to remove perl completely and reinstall. 无法深入研究您的系统,我能提供的最佳建议是完全删除perl并重新安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.