在 CentOS 6.5 上從 SRPM 進行構建

在 CentOS 6.5 上從 SRPM 進行構建

我正在嘗試編譯驚人的在 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。

相關內容