我正在尝试编译惊人的在 CentOS 6.5 上使用rpmbuild
.我找到了 Fedora Core 的 SRPM,并尝试在我的 CentOS 安装上重建它们,但遇到了依赖性问题。
基本上,虽然我安装了较新版本的软件包,但rpmbuild
似乎没有检测到它们。这是一个例子:
$ rpmbuild --rebuild xcb-util-image-0.3.9-2.fc19.src.rpm
Installing xcb-util-image-0.3.9-2.fc19.src.rpm
warning: InstallSourcePackage at: psm.c:244: Header V3 RSA/SHA256 Signature, key ID fb4b18e6: NOKEY
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
error: Failed build dependencies:
pkgconfig(xcb-util) >= 0.3.8 is needed by xcb-util-image-0.3.9-2.el6.x86_64
但正如你在这里看到的,我显然已经xcb-util
安装了 > 0.3.8:
$ sudo yum list installed | grep xcb-util
xcb-util.x86_64 0.3.6-1.el6 @UIedited_0/6.5
xcb-util.x86_64 0.3.9-2.el6 installed
我尝试删除旧版本,xcb-util
但有太多依赖于它的软件包。
与构建很棒的类似问题涉及cmake
:
$ rpmbuild --rebuild awesome-3.5.1-2.fc18.src.rpm
Installing awesome-3.5.1-2.fc18.src.rpm
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
error: Failed build dependencies:
cmake >= 2.8.0 is needed by awesome-3.5.1-2.el6.x86_64
lua-ldoc is needed by awesome-3.5.1-2.el6.x86_64
pkgconfig(libev) is needed by awesome-3.5.1-2.el6.x86_64
pkgconfig(xcb-util) >= 0.3.8 is needed by awesome-3.5.1-2.el6.x86_64
pkgconfig(xcb-keysyms) >= 0.3.4 is needed by awesome-3.5.1-2.el6.x86_64
pkgconfig(xcb-icccm) >= 0.3.8 is needed by awesome-3.5.1-2.el6.x86_64
pkgconfig(xcb-image) >= 0.3.0 is needed by awesome-3.5.1-2.el6.x86_64
pkgconfig(cairo-xcb) is needed by awesome-3.5.1-2.el6.x86_64
pkgconfig(libstartup-notification-1.0) >= 0.10 is needed by awesome-3.5.1-2.el6.x86_64
pkgconfig(libxdg-basedir) >= 1.0.0 is needed by awesome-3.5.1-2.el6.x86_64
lua-lgi is needed by awesome-3.5.1-2.el6.x86_64
$ which cmake
/usr/bin/cmake
$ cmake --version
cmake version 2.8.11.2
$ sudo yum list installed | grep cmake
cmake28.x86_64 2.8.11.2-1.el6 @dell-epel
那么有哪位yum
大师rpm
可以为我指出正确的方向吗?我不想从源代码构建所有内容,因此我希望能够rpmbuild
使用 SRPM。
答案1
您的系统似乎安装了某些软件包的多个版本。如果您安装了“yum-utils”软件包,请尝试以下命令删除这些软件包的旧版本,然后查看 rpmbuild 是否有效:
sudo /usr/bin/package-cleanup --cleandupes
答案2
万一其他人发现了这一点,我无法让它工作,并且不想走从源代码编译所有依赖项的道路,所以我最终放弃了这一努力,转而让我的构建在 Fedora 20 上工作并从官方仓库安装 Awesome。