Question

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, username, 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?

Was it helpful?

Solution

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?

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top