newest photos | all photos | cream of the crop | words | projectlog | about
mysql, perl packages, fink, shp2mysql

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=1
in 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.

Posted on July 16, 2007 3:53 AM | | Comments (0)

TrackBack

TrackBack URL for this entry:
http://www.provolot.com/cgi-bin/mt4/mt-tb.cgi/73

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)