error installing DBD::MySQL on osx 10.11 - Can#39;t link/include C library #39;#39;, aborting(在OSX 10.11上安装DBD::MySQL时出错-CAN链接/包含C库#39;#39;,正在中止)
问题描述
通过自制软件更新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
并安装mysql
VIA
改成自制的。那么投诉就是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
推荐答案
按
which mysql_config
显示mysql_config
路径例如:/usr/local/opt/mysql@5.7/bin/mysql_config
通过
which openssl
显示OpenSSL库路径。注意:如果它是/usr/local/bin/openssl
中的符号,您可以键入ls -ld /usr/local/bin/openssl
以显示实际路径例如:如果是
/usr/local/openssl/bin/openssl
, 然后您可以插入-L/usr/local/openssl/lib/
用于搜索crypto
和ssl
库编辑
mysql_config
文件并插入OpenSSL库的路径(第114行)例如:
libs=$libs -L/usr/local/opt/openssl/lib
4.键入
cpan install DBD::mysql
,成功。
这篇关于在OSX 10.11上安装DBD::MySQL时出错-CAN链接/包含C库';';,正在中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在OSX 10.11上安装DBD::MySQL时出错-CAN链接/包含C库';';,正在中止
基础教程推荐
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01