我一直在尝试在 CentOS 6 64 位上构建apr-util-1.5.2
。我遇到了这个问题:
# rpmbuild -tb apr-util-1.5.2.tar.bz2
error: Failed build dependencies:
mysql-devel is needed by apr-util-1.5.2-1.x86_64
现在的问题是我已经安装了 MySQL,但是使用二进制文件。
# yum list installed | grep My
MySQL-devel.x86_64 5.6.13-1.linux_glibc2.5 installed
我已经配置了/usr/local/mysql/bin
路径和/usr/local/mysql/lib
库路径,但仍然无法构建 tarball。
答案1
如果您想要apr-util
使用 Oracle MySQL 社区版中包含的开发标头进行构建,则需要修改文件apr-util.spec
以引用它:
$ diff -ub apr-util.spec~ apr-util.spec
--- apr-util.spec~ 2013-03-30 21:30:12.000000000 +0100
+++ apr-util.spec 2013-08-10 09:32:09.507297069 +0200
@@ -53,7 +53,7 @@
%package mysql
Group: Development/Libraries
Summary: APR utility library MySQL DBD driver
-BuildRequires: mysql-devel
+BuildRequires: MySQL-devel
Requires: apr-util = %{version}-%{release}
%description mysql
答案2
MySQL-devel.x86_64 5.6.13-1.linux_glibc2.5安装
它不是内置包。你从哪里得到它?
您需要通过 yum 安装 mysql-devel
# yum install mysql-devel
如果你真的需要使用 mysql-5.6.x,你可以尝试使用 IUS Community repo
# yum --enablerepo=ius-dev search mysql56
mysql56-debuginfo.x86_64 : Debug information for package mysql56
mysql56.x86_64 : MySQL client programs and shared libraries
mysql56-bench.x86_64 : MySQL benchmark scripts and data
mysql56-devel.x86_64 : Files for development of MySQL applications
mysql56-embedded.x86_64 : MySQL as an embeddable library
mysql56-embedded-devel.x86_64 : Development files for MySQL as an embeddable library
mysql56-libs.x86_64 : The shared libraries required for MySQL clients
mysql56-server.x86_64 : The MySQL server and related files
mysql56-test.x86_64 : The test suite distributed with MySQL
答案3
它区分大小写:MySQL-devel
不是mysql-devel
。第一个可以从 mysql.com 下载,第二个可以从 centos repo 下载:)