-1

I am trying to use MAMP to develop locally but my perl scripts are failing to connect to my mysql database. When I review the apache log I see "install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC". When I run > which perl I get the location of my perl installation and have added that to the perl path in my MAMP's config file.

I have also tried to install DMD::MySql using cpan[1]> install DBD::mysql But it fails in the end. I have included the log for the cpan installation process below. I'm hoping that someone has an idea for me. I am pretty new with this stuff and have been trying to piece my way through for a little while now.

Any help that someone might have would be much appreciated Thanks

****cpan log****

Checking if your kit is complete...
Looks good
Using DBI 1.636 (for perl 5.016000 on darwin-2level) installed in /Users/archie/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/auto/DBI/
Writing Makefile for DBD::mysql
Wide character in print at /Users/archie/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/ExtUtils/MakeMaker.pm line 1028.
Wide character in print at /Users/archie/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/ExtUtils/MakeMaker.pm line 1028.
Writing MYMETA.yml and MYMETA.json
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cc -c  -I/Users/archie/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/auto/DBI -I/usr/local/Cellar/mysql/5.7.14/include/mysql -fno-omit-frame-pointer -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -O3   -DVERSION=\"4.040\" -DXS_VERSION=\"4.040\"  "-I/Users/archie/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/darwin-2level/CORE"   dbdimp.c
/Users/archie/perl5/perlbrew/perls/perl-5.16.0/bin/perl -p -e "s/~DRIVER~/mysql/g" /Users/archie/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/auto/DBI/Driver.xst > mysql.xsi
/Users/archie/perl5/perlbrew/perls/perl-5.16.0/bin/perl /Users/archie/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/ExtUtils/xsubpp  -typemap /Users/archie/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/ExtUtils/typemap  mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 249
Warning: duplicate function definition 'rows' detected in mysql.xs, line 673
cc -c  -I/Users/archie/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/auto/DBI -I/usr/local/Cellar/mysql/5.7.14/include/mysql -fno-omit-frame-pointer -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -O3   -DVERSION=\"4.040\" -DXS_VERSION=\"4.040\"  "-I/Users/archie/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/darwin-2level/CORE"   mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.bundle
LD_RUN_PATH="/usr/local/Cellar/mysql/5.7.14/lib:/usr/lib" env MACOSX_DEPLOYMENT_TARGET=10.3 cc  -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector dbdimp.o mysql.o  -o blib/arch/auto/DBD/mysql/mysql.bundle     \
       -L/usr/local/Cellar/mysql/5.7.14/lib -lmysqlclient -lssl -lcrypto    \

ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [blib/arch/auto/DBD/mysql/mysql.bundle] Error 1
  MICHIELB/DBD-mysql-4.040.tar.gz
  /usr/bin/make -- NOT OK
'YAML' not installed, will not store persistent state
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible
Failed during this command:
 MICHIELB/DBD-mysql-4.040.tar.gz              : make NO
Archie Archbold
  • 179
  • 1
  • 2
  • 8

1 Answers1

0

make is reporting a missing library (ssl). You have to install ssl libraries first. Or you may try to install and use DBD::mysqlPP

ulix
  • 274
  • 1
  • 2
  • 13