开发者

What is the reason for the error message "Library not loaded: libmysqlclient.18.dylib"?

I have no experience working with Perl, and I'm trying to run the geo_to_mysql.pl program for a project I'm working on. I made no modifications to the program other than the database, userna开发者_运维技巧me, password and file directory path in the first few lines.

When running the program, I keep getting this error:

install_driver(mysql) failed: Can't load '/Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle, 1): Library not loaded: libmysqlclient.18.dylib

Referenced from: /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle

Reason: image not found at /System/Library/Perl/5.10.0/darwin-thread-multi-2level/DynaLoader.pm line 207.

at (eval 7) line 3

Compilation failed in require at (eval 7) line 3.

Perhaps a required shared library or dll isn't installed where expected

I've made sure that I installed the DBD required for MySQL from CPAN, so I don't think that's the issue. Can anyone shed some light on this issue?


It sure sounds like you might want to read this blog post:

http://probably.co.uk/problems-installing-dbdmysql-on-os-x-snow-leopard.html

The issue seems to be that the mysqlclient dynamic library doesn't have path information in it. You need to manaully fix this (as the post above notes).

One of the cheaper solutions is to symlink or copy the libmysqlclient library to /usr/lib.

Hope this helps anyone looking for this question in the future.


The DBD::mysql module needs access to the MySQL client libraries in order to work. I'm surprised that DBD::mysql even installed without them being on your system. How did you install the DBD::mysql module?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜