Upgrade

升級 Gentoo 時的依賴衝突

  • December 29, 2017

當我嘗試升級我的 Gentoo 系統時,我遇到了以下錯誤:

WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

sys-libs/zlib:0

 (sys-libs/zlib-1.2.11-r1:0/1::gentoo, ebuild scheduled for merge) conflicts with
   sys-libs/zlib[minizip] required by (dev-qt/qtwebengine-5.7.1-r2:5/5.7::gentoo, installed)
                 ^^^^^^^ 
   sys-libs/zlib[minizip] required by (net-im/psi-1.3:0/0::gentoo, installed)
                 ^^^^^^^ 

media-libs/libvpx:0

 (media-libs/libvpx-1.5.0:0/3::gentoo, ebuild scheduled for merge) conflicts with
   >=media-libs/libvpx-1.5:=[svc] required by (dev-qt/qtwebengine-5.7.1-r2:5/5.7::gentoo, installed)
                             ^^^ 
   >=media-libs/libvpx-1.5:0/3=[svc] required by (dev-qt/qtwebengine-5.7.1-r2:5/5.7::gentoo, installed)
                                ^^^ 

dev-qt/qtcore:5

 (dev-qt/qtcore-5.7.1-r3:5/5.7::gentoo, ebuild scheduled for merge) conflicts with
   ~dev-qt/qtcore-5.7.1[icu] required by (dev-qt/qtwebkit-5.7.1:5/5.7::gentoo, installed)
                        ^^^ 

media-video/ffmpeg:0

 (media-video/ffmpeg-3.3.5:0/55.57.57::gentoo, ebuild scheduled for merge) conflicts with
   >=media-video/ffmpeg-2.6.3[webp,v4l] required by (net-im/qtox-1.11.0:0/0::gentoo, installed)
                              ^^^^ ^^^ 

dev-libs/libpcre:3

 (dev-libs/libpcre-8.41:3/3::gentoo, ebuild scheduled for merge) conflicts with
   >=dev-libs/libpcre-8.38[pcre16,unicode] required by (dev-qt/qtcore-5.7.1-r3:5/5.7::gentoo, installed)
                           ^^^^^^         

app-text/poppler:0

 (app-text/poppler-0.56.0:0/67::dantrell-gnome, ebuild scheduled for merge) conflicts with
   app-text/poppler:=[qt5] required by (app-office/texmaker-4.5-r2:0/0::gentoo, installed)
                      ^^^ 
   app-text/poppler:0/67=[qt5] required by (app-office/texmaker-4.5-r2:0/0::gentoo, installed)
                          ^^^ 


!!! The following installed packages are masked:
- dev-vcs/monotone-1.0-r4::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Pacho Ramos <pacho@gentoo.org> (28 Dec 2017)
# Multiple build failures and bugs (#634316), fails with recent lua
# (#434242), init script is buggy (#496724), bash completion files installed
# wrongly (#526280), fails with newer botan (#537572). Removal in a month.

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

如何解決這種依賴衝突?

’ 表示的^^^是,有一些包依賴項期望啟用某些 USE 標誌。例如:

sys-libs/zlib:0

 (sys-libs/zlib-1.2.11-r1:0/1::gentoo, ebuild scheduled for merge) conflicts with
   sys-libs/zlib[minizip] required by (dev-qt/qtwebengine-5.7.1-r2:5/5.7::gentoo, installed)
                 ^^^^^^^ 
   sys-libs/zlib[minizip] required by (net-im/psi-1.3:0/0::gentoo, installed)

在上面的例子中,qtwebengine依賴psi於使用 USE 標誌zlib編譯。minizip

為了解決這個問題,您需要將預期的 USE 標誌添加到您的make.conf舊版 Gentoo 安裝中,該文件位於/etc/make.conf,而在較新的安裝中位於/etc/portage/make.conf.

該文件包含一個USE帶有空格分隔的標誌列表的變數。因此,首先檢查相關標誌是否在列表中,但以破折號 (-) 為前綴,表示禁用該標誌。如果是這樣,您需要刪除破折號以啟用該標誌。另一方面,如果未列出該標誌,則只需添加它。

引用自:https://unix.stackexchange.com/questions/413706