我试图在centos 7上从源代码构建apr-utils-1.6.1(目标是获得httpd-2.4.29),但我遇到了依赖性问题:
# rpmbuild -tb apr-util-1.6.1.tar.bz2
error: Failed build dependencies:
db4-devel is needed by apr-util-1.6.1-1.x86_64
db4-devel在yum中不可用,libdb-devel提供的版本5不满足依赖性要求。
我试过下载和安装db4-devel,但它有自己的依赖关系,我无法满足:
# rpm -iv db4-devel-4.7.25-22.el6.x86_64.rpm
warning: db4-devel-4.7.25-22.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
db4 = 4.7.25-22.el6 is needed by db4-devel-4.7.25-22.el6.x86_64
db4-cxx = 4.7.25-22.el6 is needed by db4-devel-4.7.25-22.el6.x86_64
libdb-4.7.so()(64bit) is needed by db4-devel-4.7.25-22.el6.x86_64
libdb_cxx-4.7.so()(64bit) is needed by db4-devel-4.7.25-22.el6.x86_64
尝试安装db4也失败,因为berkely db version 5已经安装并在centos 7上使用:
# rpm -iv db4-4.7.25-22.el6.x86_64.rpm
warning: db4-4.7.25-22.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
db4 < 5 is obsoleted by (installed) libdb-5.3.21-20.el7.x86_64
我真的不知道现在该怎么办。我只需要减少损失部署一个CentOS 6盒子吗?似乎centos 6仍然有db4。我正在考虑修改spec文件以删除db4需求,但我不确定这一点的含义,甚至不知道如何正确地做到这一点。
谢谢。
最佳答案
rpmbuild-tb apr-util-1.6.1.tar.bz2
没有规范文件,但是apr-util-1.6.1/build/rpm/apr-util.spec.in
最好使用带有常规apr-util.spec
文件的源代码:apr-util-1.6.1-1.fc27.src.rpm
http://dl.fedoraproject.org/pub/fedora/linux/updates/27/SRPMS/Packages/a/apr-util-1.6.1-1.fc27.src.rpm
请不要以根用户身份构建RPM包,在/home/name/:https://www.linuxquestions.org/questions/linux-software-2/need-rpm-package-for-php-version-5-2-7-and-up-on-redhat-5-1-a-766486/#13中设置一个未授权的rpm build环境
用$ rpm -Uvh apr-util-1.6.1-1.fc27.src.rpm
解压源文件。以及$ cd rpms/SPECS/
。编辑'apr util.spec'到新的依赖项,并尝试:$ rpmbuild -bb apr-util.spec
关于linux - 在CentOS 7上从源代码构建apr-utils —依赖性问题,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47557647/