dbd-mysql测试_DBD::mysql的cpan安装测试失败,找不到符号。OSX莫哈韦

这看起来已经有好几年了-但是我找不到任何最近的和Mac相关的东西,而且只需要安装CPAN模块DBD::mysql我已经在互联网上搜索了好几天了。。。

# Failed test 'use DBD::mysql;'

# at t/00base.t line 15.

# Tried to use 'DBD::mysql'.

# Error: Can't load '/Users/robert/.cpanm/work/1542100720.91387/DBD-mysql-4.048/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/robert/.cpanm/work/1542100720.91387/DBD-mysql-4.048/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Symbol not found: _mysql_affected_rows

# Referenced from: /Users/robert/.cpanm/work/1542100720.91387/DBD-mysql-4.048/blib/arch/auto/DBD/mysql/mysql.bundle

# Expected in: flat namespace

# in /Users/robert/.cpanm/work/1542100720.91387/DBD-mysql-4.048/blib/arch/auto/DBD/mysql/mysql.bundle at /usr/local/Cellar/perl/5.28.0/lib/perl5/5.28.0/darwin-thread-multi-2level/DynaLoader.pm line 197.

# ^@ at t/00base.t line 15.

# Compilation failed in require at t/00base.t line 15.

# BEGIN failed--compilation aborted at t/00base.t line 15.

Bailout called. Further testing stopped: Unable to load DBD::mysql

FAILED--Further testing stopped: Unable to load DBD::mysql

make: *** [test_dynamic] Error 255

-> FAIL Installing DBD::mysql failed. See /Users/robert/.cpanm/work/1542100720.91387/build.log for details. Retry with --force to force install it.

这是我用的cpanm线。

sudo cpanm --configure-args="--libs='-L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/Cellar/mysql/8.0.12/lib' --cflags='-I/usr/local/opt/openssl/include -I/usr/local/include/mysql -I/usr/local/Cellar/mysql/8.0.12/include/mysql'" DBD::mysql

我已经在mysql上安装了自制软件,以及其他所有与此相关的东西。我甚至复制了一些lib到系统目录中,但是似乎没有什么东西想让这个cpan模块安装和工作。

编辑:在这一行后面添加。

我们试试手工做这个包裹吧

sudo perl Makefile.PL --libs="-L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/Cellar/mysql/8.0.12/lib -lssl -lcrypto"

zeus:DBD-mysql-4.048-0 robert$ sudo perl Makefile.PL --libs="-L/usr/local/opt/openssl/lib -lssl -lcrypto -L/usr/local/lib -L/usr/local/Cellar/mysql/8.0.12/lib"

I will use the following settings for compiling and testing:

cflags (mysql_config ) = -I/usr/local/Cellar/mysql/8.0.12/include/mysql

embedded (guessed ) =

libs (User's choice) = -L/usr/local/opt/openssl/lib -lssl -lcrypto -L/usr/local/lib -L/usr/local/Cellar/mysql/8.0.12/lib

mysql_config (Users choice ) = mysql_config

nocatchstderr (default ) = 0

nofoundrows (default ) = 0

nossl (default ) = 0

testdb (User's choice) = test

testhost (default ) =

testpassword (default ) =

testport (default ) =

testsocket (default ) =

testuser (User's choice) = root

To change these settings, see 'perl Makefile.PL --help' and

'perldoc DBD::mysql::INSTALL'.

Checking if libs are available for compiling...

Looks good.

Checking if your kit is complete...

Looks good

Using DBI 1.642 (for perl 5.028000 on darwin-thread-multi-2level) installed in /usr/local/Cellar/perl/5.28.0/lib/perl5/site_perl/5.28.0/darwin-thread-multi-2level/auto/DBI/

Generating a Unix-style Makefile

Writing Makefile for DBD::mysql

Writing MYMETA.yml and MYMETA.json

zeus:DBD-mysql-4.048-0 robert$

现在让我们看看

制作

看起来不错。1个关于最宽字体的警告,但它只是一个警告。。。

然后,mysql.bundle是制造的

chmod 755 blib/arch/auto/DBD/mysql/mysql.bundle

Manifying 3 pod documents

好吧,现在是大考验。

.

... 但它失败了。

zeus:DBD-mysql-4.048-0 robert$ sudo make test

"/usr/local/Cellar/perl/5.28.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- mysql.bs blib/arch/auto/DBD/mysql/mysql.bs 644

PERL_DL_NONLAZY=1 "/usr/local/Cellar/perl/5.28.0/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t

t/00base.t .............................. 1/6

# Failed test 'use DBD::mysql;'

# at t/00base.t line 15.

# Tried to use 'DBD::mysql'.

# Error: Can't load '/Users/robert/.cpan/build/DBD-mysql-4.048-0/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/robert/.cpan/build/DBD-mysql-4.048-0/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Symbol not found: _mysql_affected_rows

# Referenced from: /Users/robert/.cpan/build/DBD-mysql-4.048-0/blib/arch/auto/DBD/mysql/mysql.bundle

# Expected in: flat namespace

# in /Users/robert/.cpan/build/DBD-mysql-4.048-0/blib/arch/auto/DBD/mysql/mysql.bundle at /usr/local/Cellar/perl/5.28.0/lib/perl5/5.28.0/darwin-thread-multi-2level/DynaLoader.pm line 197.

# at t/00base.t line 15.

# Compilation failed in require at t/00base.t line 15.

# BEGIN failed--compilation aborted at t/00base.t line 15.

Bailout called. Further testing stopped: Unable to load DBD::mysql

FAILED--Further testing stopped: Unable to load DBD::mysql

make: *** [test_dynamic] Error 255

... 就在这里。同样的错误。现在我也尝试了MariaDB-相同的结果,尽管错误消息略有不同。

我错过了什么。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值