dbd mysql 4.046安装,无法在macOS Mojave下安装DBD :: mysql

Can't install DBD::mysql under macOS Mojave with perl v5.18.2

MySQL Community Server 8.0.13 is installed from DMG from the official site.

Here is the installation log via cpan:

Checking if libs are available for compiling...

dyld: Library not loaded: @rpath/libmysqlclient.21.dylib

Referenced from: /Users/dmitry/.cpan/build/DBD-mysql-4.049-B01C7C/assertliblxuNN4_E

Reason: image not found

dyld: Library not loaded: libssl.1.0.0.dylib

Referenced from: /Users/dmitry/.cpan/build/DBD-mysql-4.049-B01C7C/assertliba7FpHZin

Reason: image not found

dyld: Library not loaded: libcrypto.1.0.0.dylib

Referenced from: /Users/dmitry/.cpan/build/DBD-mysql-4.049-B01C7C/assertlibeWospvnt

Reason: image not found

wrong result: 'mysqlclient', 'ssl', 'crypto'

Warning: No success on command[/usr/bin/perl Makefile.PL]

DVEEDEN/DBD-mysql-4.049.tar.gz

/usr/bin/perl Makefile.PL -- NOT OK

Swears at the lack of libraries, although they are:

dmitry@iMac-Dmitrij:~$ ls -la /usr/local/mysql/lib/*.dylib

-rw-r--r-- 1 root wheel 1985924 7 окт 13:14 /usr/local/mysql/lib/libcrypto.1.0.0.dylib

lrwxr-xr-x 1 root wheel 21 18 дек 23:35 /usr/local/mysql/lib/libcrypto.dylib -> libcrypto.1.0.0.dylib

-rwxr-xr-x 1 root wheel 5844880 7 окт 15:28 /usr/local/mysql/lib/libmysqlclient.21.dylib

lrwxr-xr-x 1 root wheel 23 18 дек 23:35 /usr/local/mysql/lib/libmysqlclient.dylib -> libmysqlclient.21.dylib

-rwxr-xr-x 1 root wheel 540768 7 окт 15:28 /usr/local/mysql/lib/libmysqlharness.1.dylib

lrwxr-xr-x 1 root wheel 23 18 дек 23:35 /usr/local/mysql/lib/libmysqlharness.dylib -> libmysqlharness.1.dylib

-rwxr-xr-x 1 root wheel 6861328 7 окт 15:28 /usr/local/mysql/lib/libmysqlrouter.1.dylib

lrwxr-xr-x 1 root wheel 22 18 дек 23:35 /usr/local/mysql/lib/libmysqlrouter.dylib -> libmysqlrouter.1.dylib

-rw-r--r-- 1 root wheel 429768 7 окт 13:14 /usr/local/mysql/lib/libssl.1.0.0.dylib

lrwxr-xr-x 1 root wheel 18 18 дек 23:35 /usr/local/mysql/lib/libssl.dylib -> libssl.1.0.0.dyli

What do you advise ?

解决方案

I had a problem installing DBD::mysql on Mojave 10.14. Followed the instructions in this link:

https://github.com/perl5-dbi/DBD-mysql/commit/00806bc46fe23a862a325d19cba07c239b401def

first try

brew install openssl mysql-connector-c

this installs but running

cpan install DBD::mysql

fails because the -l file designation is empty shown in the output line:

libs (mysql_config) = -L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -l

editing the

/usr/local/Cellar/mysql-connector-c/6.1.11/bin/mysql_config line #114

and change

libs="$libs -l" to libs="$libs -lmysqlclient"

then run:

cpan install DBD::mysql

is joy.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值