아래는 흔히 보는 emerge 할때 나오는 에러이다. 의존성에 관련된 문제인데 해결하는 방법을 알아보자.
!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:
dev-lang/perl:0
(dev-lang/perl-5.36.1-r3:0/5.36::gentoo, ebuild scheduled for merge) USE="gdbm -berkdb -debug -doc -ithreads -minimal -quadmath" ABI_X86="(64)" pulled in by
=dev-lang/perl-5.36* required by (virtual/perl-File-Path-2.180.0-r2:0/0::gentoo, ebuild scheduled for merge) USE="" ABI_X86="(64)"
^ ^^^^^
(and 39 more with the same problem)
(dev-lang/perl-5.34.1-r4:0/5.34::gentoo, ebuild scheduled for merge) USE="gdbm -berkdb -debug -doc -ithreads -minimal -quadmath" ABI_X86="(64)" pulled in by
dev-lang/perl:0/5.34= required by (dev-perl/TimeDate-2.330.0-r1:0/0::gentoo, installed) USE="userland_GNU -test" ABI_X86="(64)"
^^^^^^^^
(and 43 more with the same problem)
net-libs/gnutls:0
(net-libs/gnutls-3.7.8:0/30.30::gentoo, ebuild scheduled for merge) USE="cxx idn nls openssl seccomp tls-heartbeat zlib zstd -brotli -dane -doc -examples -guile -pkcs11 (-sslv2) (-sslv3) -static-libs -test (-test-full) -tools -verify-sig" ABI_X86="(64) -32 (-x32)" pulled in by
>=net-libs/gnutls-3.7.4:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] required by (net-libs/glib-networking-2.76.0:0/0::gentoo, ebuild scheduled for merge) USE="gnome libproxy ssl -test" ABI_X86="(64) -32 (-x32)"
^^ ^^^^^
(net-libs/gnutls-3.7.2:0/30::gentoo, installed) USE="cxx idn nls openssl seccomp tls-heartbeat userland_GNU -dane -doc -examples -guile -pkcs11 (-sslv2) (-sslv3) -static-libs -test (-test-full) -tools -valgrind" ABI_X86="(64) -32 (-x32)" pulled in by
net-libs/gnutls:0/30= required by (mail-mta/nullmailer-2.2-r2:0/0::gentoo, installed) USE="ssl userland_GNU -test" ABI_X86="(64)"
^^^^^^
NOTE: Use the '--verbose-conflicts' option to display parents omitted above
It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously. If such a conflict exists in
the dependencies of two different packages, then those packages can
not be installed simultaneously.
For more information, see MASKED PACKAGES section in the emerge man
page or refer to the Gentoo Handbook.
The following USE changes are necessary to proceed:
(see "package.use" in the portage(5) man page for more details)
# required by app-text/mandoc-1.14.6::gentoo[cgi]
# required by sys-libs/efivar-38::gentoo
# required by sys-boot/efibootmgr-18-r1::gentoo
# required by sys-boot/grub-2.06-r7::gentoo[-grub_platforms_efi-32,grub_platforms_efi-64]
# required by @selected
# required by @world (argument)
>=sys-libs/zlib-1.2.13-r1 static-libs
Use --autounmask-write to write changes to config files (honoring
CONFIG_PROTECT). Carefully examine the list of proposed changes,
paying special attention to mask or keyword changes that may expose
experimental or unstable packages.
* In order to avoid wasting time, backtracking has terminated early
* due to the above autounmask change(s). The --autounmask-backtrack=y
* option can be used to force further backtracking, but there is no
* guarantee that it will produce a solution.
충돌이 나는 이유
일단 Perl의 업데이트 시에 생기는 문제는 virtual/perl-File-Path 버전은 perl-5.36.1이 필요한 상태이며, TimeDate 버전은 perl-5.34.1 버전을 필요로 하는 것이다. 이걸 해결하려면 당연한 이야기 이지만 TimeDate를 없애면 된다.
gutils 패키지를 업데이트를 하려는데, gnutils-3.78 패키지는 net-libs/glib-networking-2.76.0 패키지를 업데이트로 설치할때 의존성을 갖고 있고 net-libs/gnutls-3.7.2 패키지는 mail-mta/nullmailer-2.2-r2 패키지에 의존하고 있는 상태이다. 이것도 당연한 이야기 이지만 mail-mta/nullmailer 패키지를 지우면 되는 문제이다.
지우자!
$ emerge -C mail-mta/nullmailer dev-perl/TimeDate
The following USE changes are necessary to proceed:
(see "package.use" in the portage(5) man page for more details)
# required by app-text/mandoc-1.14.6::gentoo[cgi]
# required by sys-libs/efivar-38::gentoo
# required by sys-boot/efibootmgr-18-r1::gentoo
# required by sys-boot/grub-2.06-r7::gentoo[-grub_platforms_efi-32,grub_platforms_efi-64]
# required by @selected
# required by @world (argument)
>=sys-libs/zlib-1.2.13-r1 static-libs
위의 문제는 sys-libs/zlib 패키지를 업데이트 하려면 위의 4개의 패키지를 의존하고 있는 상태이다. 그런데 이 패키지를 설치하려면 USE플래그에 static-libs가 포함되어야 하는 것이다. 그런데 이건 make.conf 파일이던 package.use에도 명확하게 작성되어 있지 않아서 emerge를 하기전에 static-libs를 명시적으로 추가하라는 것이다.
$ vi /etc/portage/package.use
sys-libs/zlib static-libs
위의 방법대로 해도 되고 make.conf에 USE 플래그를 추가해도 되는 것이다.