在Macos Mojave下安装DBD :: MySQL的麻烦



无法安装dbd :: MACOS MOJAVE下的mysql,with perl v5.18.2MySQL社区服务器8.0.13是从官方网站从DMG安装的。

这是通过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

发誓缺乏库,尽管它们是:

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

您建议什么?

我在Mojave 10.14上安装DBD :: MySQL时遇到了问题。遵循此链接中的说明: https://github.com/perl5-dbi/dbd-mysql/commit/00806bc46fe23a862a32525d19cba07c239b401def

第一次尝试

brew install openssl mysql-connector-c

此安装但运行

cpan install DBD::mysql 

失败,因为-l文件名称为空输出行中显示:

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

编辑

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

和更改

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

然后运行:

cpan install DBD::mysql

是喜悦。

相关内容

  • 没有找到相关文章

最新更新