在OSX 10.11上安装DBD::MySQL时出错-CAN链接/包含C库'',正在中止 [英] error installing DBD::MySQL on osx 10.11 - Can't link/include C library '', aborting

查看:201
本文介绍了在OSX 10.11上安装DBD::MySQL时出错-CAN链接/包含C库'',正在中止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过自制软件更新Perl后,我损坏了dbd::mysql安装 通过cpanm安装会导致:

I will use the following settings for compiling and testing:

    cflags        (mysql_config) = -I/usr/local/Cellar/mysql-connector-
    c/6.1.9/include
    embedded      (guessed     ) =
    ldflags       (guessed     ) =
    libs          (mysql_config) = -L/usr/local/Cellar/mysql-connector-
    c/6.1.9/lib -l
    mysql_config  (guessed     ) = mysql_config
    nocatchstderr (default     ) = 0
    nofoundrows   (default     ) = 0
    nossl         (default     ) = 0
    testdb        (default     ) = test
    testhost      (default     ) =
    testpassword  (default     ) =
    testport      (default     ) =
    testsocket    (default     ) =
    testuser      (guessed     ) = root

To change these settings, see 'perl Makefile.PL --help' and 'perldoc DBD::mysql::INSTALL'.

Checking if libs are available for compiling...
Can't link/include C library '', aborting.

有人知道如何解决吗? 我已尝试删除mysql-connector-c并安装mysqlVIA 改成自制的。那么投诉就是Can't link/include C library 'ssl', 'crypto', aborting。我确实安装了openssl

Perl版本:

This is perl 5, version 24, subversion 1 (v5.24.1) built for
darwin-thread-multi-2level

推荐答案

  1. which mysql_config显示mysql_config路径

    例如:/usr/local/opt/mysql@5.7/bin/mysql_config

  2. 通过which openssl显示OpenSSL库路径。注意:如果它是/usr/local/bin/openssl中的符号,您可以键入ls -ld /usr/local/bin/openssl以显示实际路径

    例如:如果是/usr/local/openssl/bin/openssl, 然后您可以插入-L/usr/local/openssl/lib/用于搜索cryptossl

  3. 编辑mysql_config文件并插入OpenSSL库的路径(第114行)

    例如:libs=$libs -L/usr/local/opt/openssl/lib

    4.键入cpan install DBD::mysql,成功。

这篇关于在OSX 10.11上安装DBD::MySQL时出错-CAN链接/包含C库'',正在中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆