To import shp files into a MySQL database, someone made a perl script called shp2mysql. Unfortunately, when I ran this, it told me that my computer required several different modules. After running around, I decided to install Fink, a sort of apt-get thing for OSX that enables you to use Unix software on OSX. I then installed a few Perl libs, but realized that Fink didn't have all of them available.
I then tried to use CPAN, which I suppose is like Fink/apt-get, but just for Perl libraries. CPAN's ftp wouldn't work however, which may be a combination between using active vs. passive ftp. To fix this, I set
&rt; export FTP_PASSIVE=1in the bash shell of a NON-ROOT user, then did
sudo perl -MCPAN -e 'install Bundle::DBD'It still doesn't work, however. Here are the error messages:
Can't load '/Library/Perl/5.8.6/darwin-thread-multi- 2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Library/Perl/5.8.6/darwin-thread-multi- 2level/auto/DBD/mysql/mysql.bundle, 1): Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib Referenced from: /Library/Perl/5.8.6/darwin-thread-multi- 2level/auto/DBD/mysql/mysql.bundle Reason: image not found at /System/Library/ Perl/5.8.6/darwin-thread-multi- 2level/DynaLoader.pm line 230. at -e line 1 Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.
Gah.
update: I fixed this eventually; check the solution process here: DBD::mysql fixed!, here: MySQL Spatial abilities = bad, here: YEAH! and NO!, here: PostgreSQL & PostGIS! , here: PostGIS continued, but..., and finally fixed it here: success.