Trying to install DBD::mysql
on my Mac Sierra computer running mysql v 5.7.17. Getting the following error when trying to install with cpanm install DBD::mysql
:
Checking if libs are available for compiling...
Can't link/include C library 'ssl', 'crypto', aborting.
Other solutions I have found so far don't address this issue with Sierra.
Strawberry Perl comes bundled with DBD::mysql and the needed client libraries. ActivePerl offers a PPM archive of DBD::mysql. All you need to do is typing in a cmd.exe window: This will fetch the module via HTTP and install them. If you need to use a WWW proxy server, the environment variable HTTP_proxy must be set:
This installs DBD::mysql into the Perl hierarchy. This was tested with MySQL version 3.23.54a and DBD::mysql version 2.1022. I patched the above mentioned test scripts and sent the patches to the author of DBD::mysql Jochen Wiedman. Georg Rehfeld 15. Jan. 2003 Some Linux distributions don't come with a gzip library by default.
This may require choosing a "Custom installation" and selecting the appropriate option when running the MySQL setup program. DBD::mysql is a DBI driver, hence you need DBI. It is available from the same source where you got the DBD::mysql distribution from. A C compiler is only required if you install from source.
Late versions of MySQL come with support for compression. Thus it may be required that you have install an RPM package like libz-devel, libgz-devel or something similar. Binary installation is possible in the most cases, depending on your system. Strawberry Perl comes bundled with DBD::mysql and the needed client libraries.
You can pass libs
and cflags
arg to help Makefile.PL
find the libaries on the machine (in my case the openssl libraries were installed with homebrew):
cpanm --configure-args="--libs='-L/usr/local/opt/openssl/lib -L/usr/local/Cellar/mysql/5.7.17/lib' --cflags='-I/usr/local/opt/openssl/include -I/usr/local/Cellar/mysql/5.7.17/include/mysql'" DBD::mysql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With