Gentoo更新portage记录

小记一下这两天更新服务器版本遇到的各种问题。

服务器系统: Gentoo

第一天

其实本来不打算更新系统的,因为最近想试试免费的SSL证书,于是自然而然搜到了letsencrypt,跟着他们的流程需要安装

$ sudo emerge -av app-crypt/certbot app-crypt/certbot-nginx

运行了下,结果给出的错误是:

1!!! The following installed packages are masked: 2- sys-devel/gcc-4.4.5::gentoo (masked by: package.mask) 3/usr/portage/profiles/package.mask: 4# Michał Górny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>, 5# Matthias Maier <tamiko@gentoo.org> (21 May 2017 and later updates) 6# These old versions of toolchain packages (binutils, gcc, glibc) are no 7# longer officially supported and are not suitable for general use. Using 8# these packages can result in build failures (and possible breakage) for 9# many packages, and may leave your system vulnerable to known security 10# exploits. 11# If you still use one of these old toolchain packages, please upgrade (and 12# switch the compiler / the binutils) ASAP. If you need them for a specific 13# (isolated) use case, feel free to unmask them on your system. 14 15- sys-libs/glibc-2.23-r3::gentoo (masked by: package.mask) 16- dev-perl/DBD-mysql-4.41.0::gentoo (masked by: package.mask) 17/usr/portage/profiles/package.mask: 18# Kent Fredric <kentnl@gentoo.org> (27 May 2018) 19# Subject to Man-in-the-middle security bypass vulnerability. 20# Retained in tree only for users who need older versions 21# for compatibility reasons. 22# Bug: #623942 23 24- sys-devel/gcc-4.5.4::gentoo (masked by: package.mask) 25- sys-devel/binutils-2.26.1::gentoo (masked by: package.mask) 26For more information, see the MASKED PACKAGES section in the emerge 27man page or refer to the Gentoo Handbook.

看到这个错误我还是懵的状态,不懂什么意思,然后网上一通乱搜之后,糊里糊涂的觉得是不是应该更新一下portage树,于是运行如下命令:

1$ sudo emerge --sync 2$ sudo emerge --depclean 3$ sudo emerge --update --newuse --deep --with-bdeps=y @world

前两个命令没有报错,最后一个命令肯定是没成功的,但是的错误信息跟之前的类似,意思就是要我去更新Protage版本。

第二天

又开始来折腾了,我这不达目的不罢休的精神也是可嘉。

网上开始搜索如何更新portage

$ sudo emerge -1v portage

打开man emerge, -l 的选项意思如下

--changelog (-l)

Use this in conjunction with the --pretend option. This will show the

ChangeLog entries for all the packages that will be upgraded.


上面命令的结果还是关于 EAPI

1!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf' 2!!! Set 'masters = gentoo' in this file for future compatibility 3 4 * IMPORTANT: 5 news items need reading for repository 'gentoo'. 5 * Use eselect news read to view new items. 6 7 8These are the packages that would be merged, in order: 9 10Calculating dependencies... done! 11 12!!! All ebuilds that could satisfy "app-eselect/eselect-pinentry" have been masked. 13!!! One of the following masked packages is required to complete your request: 14- app-eselect/eselect-pinentry-0.7::gentoo (masked by: EAPI 7) 15 16The current version of portage supports EAPI '6'. You must upgrade to a 17newer version of portage before EAPI masked packages can be installed. 18(dependency required by "app-crypt/pinentry-1.1.0-r2::gentoo" [ebuild]) 19(dependency required by "app-crypt/gnupg-2.2.10::gentoo" [ebuild]) 20(dependency required by "sys-apps/portage-2.3.51-r1::gentoo[-build,rsync-verify]" [ebuild]) 21(dependency required by "portage" [argument]) 22For more information, see the MASKED PACKAGES section in the emerge 23man page or refer to the Gentoo Handbook.

参考了https://forums.gentoo.org/viewtopic-t-1087032.html?sid=fc9d72cb8cbb9deac2142bfa542cc06f,照着运行了下面四个命令

1sudo emerge --sync 2sudo emerge -qav python 3sudo USE='-rsync-verify' emerge -qavO portage 4sudo emerge -qav portage

第一个命令没有什么知道参考的结果,下面从第二个命令开始 

$ sudo emerge -qav python

这一步虽然有warning消息提示我有几个package被masked了,但是最终python还是安装成功了,结果如下:

1Password: 2!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf' 3!!! Set 'masters = gentoo' in this file for future compatibility 4 5 * IMPORTANT: 5 news items need reading for repository 'gentoo'. 6 * Use eselect news read to view new items. 7 8[ebuild U ] sys-devel/automake-1.15.1-r2 [1.15] USE="{-test%}" 9[ebuild NS ] dev-lang/python-3.6.5 [2.7.14-r1, 3.1.3-r1, 3.4.5-r1] USE="gdbm ipv6 ncurses readline sqlite ssl (threads) xml -build -examples -hardened -libressl {-test} -tk -wininst" 10 11!!! The following installed packages are masked: 12- sys-devel/gcc-4.8.5::gentoo (masked by: package.mask) 13/usr/portage/profiles/releases/17.0/package.mask: 14# Andreas K. Huettel <dilfridge@gentoo.org> (27 May 2017) 15# In the 17.0 profiles we assume that our system compiler uses C++14 16# or later as default language setting. This means it has to be at 17# least GCC 6. If you need an older compiler for specific purposes, 18# feel free to unmask it, however, using it for normal emerging of 19# packages is neither recommended nor supported in any way. 20 21- sys-devel/binutils-2.29.1-r1::gentoo (masked by: package.mask) 22/usr/portage/profiles/package.mask: 23# Michał Górny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>, 24# Matthias Maier <tamiko@gentoo.org> (21 May 2017 and later updates) 25# These old versions of toolchain packages (binutils, gcc, glibc) are no 26# longer officially supported and are not suitable for general use. Using 27# these packages can result in build failures (and possible breakage) for 28# many packages, and may leave your system vulnerable to known security 29# exploits. 30# If you still use one of these old toolchain packages, please upgrade (and 31# switch the compiler / the binutils) ASAP. If you need them for a specific 32# (isolated) use case, feel free to unmask them on your system. 33 34- sys-devel/gcc-4.5.4::gentoo (masked by: package.mask) 35- sys-libs/glibc-2.25-r10::gentoo (masked by: package.mask) 36For more information, see the MASKED PACKAGES section in the emerge 37man page or refer to the Gentoo Handbook. 38 39 40Would you like to merge these packages? [Yes/No] yes 41>>> Recording dev-lang/python in "world" favorites file... 42>>> Verifying ebuild manifests 43>>> Emerging (1 of 2) sys-devel/automake-1.15.1-r2::gentoo 44>>> Installing (1 of 2) sys-devel/automake-1.15.1-r2::gentoo 45>>> Emerging (2 of 2) dev-lang/python-3.6.5::gentoo 46>>> Installing (2 of 2) dev-lang/python-3.6.5::gentoo 47>>> Jobs: 2 of 2 complete Load avg: 2.01, 1.30, 0.63 48 49 * Messages for package dev-lang/python-3.6.5: 50 51 * You have just upgraded from an older version of Python. 52 * 53 * Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules. 54 55!!! existing preserved libs found 56 57 * IMPORTANT: 5 news items need reading for repository 'gentoo'. 58 * Use eselect news read to view new items.

然后运行 

sudo USE='-rsync-verify' emerge -qavO portage

结果如下,没有报错:

1Password: 2!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf' 3!!! Set 'masters = gentoo' in this file for future compatibility 4 5 * IMPORTANT: 5 news items need reading for repository 'gentoo'. 6 * Use eselect news read to view new items. 7 8[ebuild U ] sys-apps/portage-2.3.51-r1 [2.3.3] USE="(ipc) native-extensions xattr -build -doc -epydoc -gentoo-dev% -rsync-verify% (-selinux) (-linguas_ru%)" PYTHON_TARGETS="python2_7 python3_6* (-pypy) -python3_4* -python3_5 (-python3_7)" 9 10Would you like to merge these packages? [Yes/No] yes 11>>> Verifying ebuild manifests 12>>> Emerging (1 of 1) sys-apps/portage-2.3.51-r1::gentoo 13>>> Installing (1 of 1) sys-apps/portage-2.3.51-r1::gentoo 14>>> Jobs: 1 of 1 complete Load avg: 1.41, 1.14, 0.67 15 16!!! existing preserved libs found 17 18 * IMPORTANT: 5 news items need reading for repository 'gentoo'. 19 * Use eselect news read to view new items.

继续运行最后一步:

$ sudo emerge -qav portage

完整结果输出如下:

1!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf' 2!!! Set 'masters = gentoo' in this file for future compatibility 3 4 * IMPORTANT: 5 news items need reading for repository 'gentoo'. 5 * Use eselect news read to view new items. 6 7[ebuild N ] app-crypt/openpgp-keys-gentoo-release-20190102 USE="-test" 8[ebuild N ] dev-libs/libunistring-0.9.10 USE="-doc -static-libs" 9[ebuild U ] dev-libs/libgpg-error-1.29 [1.10] USE="nls -common-lisp -static-libs" 10[ebuild N ] dev-libs/libassuan-2.5.1 USE="-static-libs" 11[ebuild N ] dev-libs/libksba-1.3.5-r1 USE="-static-libs" 12[ebuild N ] app-eselect/eselect-lib-bin-symlink-0.1.1 13[ebuild N ] app-eselect/eselect-pinentry-0.7 14[ebuild N ] dev-libs/libtasn1-4.13 USE="-doc -static-libs -test -valgrind" 15[ebuild N ] net-dns/libidn2-2.0.4 USE="-static-libs" 16[ebuild U ] dev-libs/libgcrypt-1.8.3 [1.4.6] USE="-doc% -o-flag-munging% -static-libs" 17[ebuild N ] dev-libs/nettle-3.4 USE="gmp -doc (-neon) -static-libs -test" CPU_FLAGS_X86="-aes" 18[ebuild N ] net-libs/gnutls-3.5.19 USE="cxx idn nls openssl seccomp tls-heartbeat zlib -dane -doc -examples -guile -openpgp -pkcs11 -sslv2 -sslv3 -static-libs -test (-test-full) -tools -valgrind" 19[ebuild N ] app-crypt/pinentry-1.1.0-r2 USE="ncurses -caps -emacs -fltk -gnome-keyring -gtk -qt5 -static" 20[ebuild N ] dev-python/bz2file-0.98 PYTHON_TARGETS="python2_7 (-pypy)" 21[ebuild N ] app-crypt/gnupg-2.2.10 USE="bzip2 nls readline smartcard ssl -doc -ldap (-selinux) -tofu -tools -usb -wks-server" 22[ebuild U ] dev-python/setuptools-40.6.3 [30.4.0] USE="-test" PYTHON_TARGETS="python2_7 python3_6* (-pypy) (-pypy3) -python3_4* -python3_5 (-python3_7)" 23[ebuild U ] dev-python/certifi-2018.4.16 [2016.9.26] PYTHON_TARGETS="python2_7 python3_6* (-pypy) (-pypy3) -python3_4* -python3_5 (-python3_7)" 24[ebuild N ] dev-python/pyblake2-1.1.2 PYTHON_TARGETS="python2_7 python3_6 (-pypy) (-pypy3) -python3_4 -python3_5 (-python3_7)" 25[ebuild N ] app-portage/gemato-14.0 USE="blake2 bzip2 gpg -lzma -sha3 -test -tools" PYTHON_TARGETS="python2_7 python3_6 (-pypy) -python3_4 -python3_5 (-python3_7)" 26[ebuild R ] sys-apps/portage-2.3.51-r1 USE="(ipc) native-extensions rsync-verify* xattr -build -doc -epydoc -gentoo-dev (-selinux)" PYTHON_TARGETS="python2_7 python3_6 (-pypy) -python3_4 -python3_5 (-python3_7)" 27 28!!! Multiple package instances within a single package slot have been pulled 29!!! into the dependency graph, resulting in a slot conflict: 30 31dev-python/setuptools:0 32 33 (dev-python/setuptools-40.6.3:0/0::gentoo, ebuild scheduled for merge) pulled in by 34 >=dev-python/setuptools-34[python_targets_pypy(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (app-portage/gemato-14.0:0/0::gentoo, ebuild scheduled for merge) 35 ^^ ^^ 36 dev-python/setuptools[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/pyblake2-1.1.2:0/0::gentoo, ebuild scheduled for merge) 37 38 dev-python/setuptools[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/certifi-2018.4.16:0/0::gentoo, ebuild scheduled for merge) 39 40 dev-python/setuptools[python_targets_pypy(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (app-portage/gemato-14.0:0/0::gentoo, ebuild scheduled for merge) 41 42 43 (dev-python/setuptools-30.4.0:0/0::gentoo, installed) pulled in by 44 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/certifi-2016.9.26:0/0::gentoo, installed) 45 46 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/chardet-2.3.0:0/0::gentoo, installed) 47 48 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/cryptography-1.7.1:0/0::gentoo, installed) 49 50 >=dev-python/setuptools-18.2[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/pip-7.1.2:0/0::gentoo, installed) 51 52 53dev-python/certifi:0 54 55 (dev-python/certifi-2018.4.16:0/0::gentoo, ebuild scheduled for merge) pulled in by 56 >=dev-python/certifi-2016.9.26[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/setuptools-40.6.3:0/0::gentoo, ebuild scheduled for merge) 57 58 59 (dev-python/certifi-2016.9.26:0/0::gentoo, installed) pulled in by 60 dev-python/certifi[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/urllib3-1.16:0/0::gentoo, installed) 61 62 >=dev-python/certifi-2016.9.26[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/setuptools-30.4.0:0/0::gentoo, installed) 63 64 65 66 67!!! The following installed packages are masked: 68- sys-libs/glibc-2.25-r10::gentoo (masked by: package.mask) 69/usr/portage/profiles/package.mask: 70# Michał Górny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>, 71# Matthias Maier <tamiko@gentoo.org> (21 May 2017 and later updates) 72# These old versions of toolchain packages (binutils, gcc, glibc) are no 73# longer officially supported and are not suitable for general use. Using 74# these packages can result in build failures (and possible breakage) for 75# many packages, and may leave your system vulnerable to known security 76# exploits. 77# If you still use one of these old toolchain packages, please upgrade (and 78# switch the compiler / the binutils) ASAP. If you need them for a specific 79# (isolated) use case, feel free to unmask them on your system. 80 81- sys-devel/gcc-4.5.4::gentoo (masked by: package.mask) 82- sys-devel/gcc-4.8.5::gentoo (masked by: package.mask) 83- sys-devel/binutils-2.29.1-r1::gentoo (masked by: package.mask) 84For more information, see the MASKED PACKAGES section in the emerge 85man page or refer to the Gentoo Handbook.

上面的错误信息我先关注到的点是:

1!!! The following installed packages are masked: 2- sys-libs/glibc-2.25-r10::gentoo (masked by: package.mask)  

mask的意思如下:

package.mask

The package.mask file primarily blocks the use of packages that cause

problems or are known to have issues on different systems. It resides

in /usr/portage/profiles.

所以可能是这个包太旧了,过期了,所以我就更新了这个包

sudo emerge sys-libs/glibc

上述命令运行结果如下:

1Calculating dependencies... done! 2[ebuild U ] sys-libs/glibc-2.27-r6 [2.25-r10] USE="multiarch%* (-compile-locales) -doc%" 3[blocks B ] <sys-devel/bison-2.7 ("<sys-devel/bison-2.7" is blocking sys-libs/glibc-2.27-r6) 4 5 * Error: The above package list contains packages which cannot be 6 * installed at the same time on the same system. 7 8 (sys-devel/bison-2.4.2:0/0::gentoo, installed) pulled in by 9 sys-devel/bison required by (sys-apps/iproute2-3.8.0:0/0::gentoo, installed) 10 sys-devel/bison required by (app-admin/sudo-1.8.1_p2:0/0::gentoo, installed) 11 >=sys-devel/bison-1.875 required by (sys-devel/gcc-6.4.0-r1:6.4.0/6.4.0::gentoo, installed) 12 >=sys-devel/bison-1.875 required by (sys-devel/gcc-4.5.4:4.5.4/4.5.4::gentoo, installed) 13 sys-devel/bison required by (virtual/yacc-0:0/0::gentoo, installed) 14 sys-devel/bison required by (dev-db/postgresql-9.0.5:9.0/9.0::gentoo, installed) 15 >=sys-devel/bison-1.875 required by (sys-devel/gcc-4.8.5:4.8.5/4.8.5::gentoo, installed) 16 sys-devel/bison required by (sys-libs/glibc-2.27-r6:2.2/2.2::gentoo, ebuild scheduled for merge) 17 18 (sys-libs/glibc-2.27-r6:2.2/2.2::gentoo, ebuild scheduled for merge) pulled in by 19 >=sys-libs/glibc-2.6 required by (sys-libs/e2fsprogs-libs-1.41.14:0/0::gentoo, installed) 20 >=sys-libs/glibc-2.8 required by (sys-devel/gcc-4.8.5:4.8.5/4.8.5::gentoo, installed) 21 >=sys-libs/glibc-2.7 required by (sys-apps/iproute2-3.8.0:0/0::gentoo, installed) 22 >=sys-libs/glibc-2.9 required by (sys-fs/udev-151-r4:0/0::gentoo, installed) 23 >=sys-libs/glibc-2.8 required by (sys-devel/gcc-4.5.4:4.5.4/4.5.4::gentoo, installed) 24 sys-libs/glibc 25 sys-libs/glibc required by @selected 26 >=sys-libs/glibc-2.13 required by (sys-devel/gcc-6.4.0-r1:6.4.0/6.4.0::gentoo, installed) 27 >=sys-libs/glibc-2.9_p20081201 required by (dev-libs/libev-4.23:0/0::gentoo, installed) 28 sys-libs/glibc required by (dev-java/sun-jdk-1.6.0.29:1.6/1.6::gentoo, installed) 29 >=sys-libs/glibc-2.7 required by (sys-libs/pam-1.1.3:0/0::gentoo, installed) 30 sys-libs/glibc:2.2 required by (virtual/libc-0:0/0::gentoo, installed) 31 32 33For more information about Blocked Packages, please refer to the following 34section of the Gentoo Linux x86 Handbook (architecture is irrelevant): 35 36https://wiki.gentoo.org/wiki/Handbook:X86/Working/Portage#Blocked_packages 37 38 39!!! The following installed packages are masked: 40- sys-devel/gcc-4.5.4::gentoo (masked by: package.mask) 41/usr/portage/profiles/package.mask: 42# Michał Górny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>, 43# Matthias Maier <tamiko@gentoo.org> (21 May 2017 and later updates) 44# These old versions of toolchain packages (binutils, gcc, glibc) are no 45# longer officially supported and are not suitable for general use. Using 46# these packages can result in build failures (and possible breakage) for 47# many packages, and may leave your system vulnerable to known security 48# exploits. 49# If you still use one of these old toolchain packages, please upgrade (and 50# switch the compiler / the binutils) ASAP. If you need them for a specific 51# (isolated) use case, feel free to unmask them on your system. 52 53- sys-devel/gcc-4.8.5::gentoo (masked by: package.mask) 54- sys-devel/binutils-2.29.1-r1::gentoo (masked by: package.mask) 55For more information, see the MASKED PACKAGES section in the emerge 56man page or refer to the Gentoo Handbook.

红色标注的话意思是想要安装的包被 sys-devel/bison-2.7 给阻塞了,所以我打算先更新 sys-devel/bison

sudo emerge sys-devel/bison

上面命令运行没报错,bison更新完了,那再次更新 glibc

sudo emerge sys-libs/glibc

😁glibc也更新成功了, 感觉离成功不远啦!

Note: 更新完glibc,要记得去重启cron,不然会cronjob会如下错误:

1Feb 28 17:15:01 staging cron[18908]: PAM unable to dlopen(/lib/security/pam_unix.so): /lib/libcrypt.so.1: symbol __open_nocancel, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference 2Feb 28 17:15:01 staging cron[18908]: PAM adding faulty module: /lib/security/pam_unix.so 3Feb 28 17:15:01 staging cron[18908]: Module is unknown

返回再次运行 

sudo emerge -qav portage

给出如下错误:

1!!! Multiple package instances within a single package slot have been pulled 2!!! into the dependency graph, resulting in a slot conflict: 3 4dev-python/setuptools:0 5 6 (dev-python/setuptools-40.6.3:0/0::gentoo, ebuild scheduled for merge) pulled in by 7 >=dev-python/setuptools-34[python_targets_pypy(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (app-portage/gemato-14.0:0/0::gentoo, ebuild scheduled for merge) 8 ^^ ^^ 9 dev-python/setuptools[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/pyblake2-1.1.2:0/0::gentoo, ebuild scheduled for merge) 10 11 dev-python/setuptools[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/certifi-2018.4.16:0/0::gentoo, ebuild scheduled for merge) 12 13 dev-python/setuptools[python_targets_pypy(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (app-portage/gemato-14.0:0/0::gentoo, ebuild scheduled for merge) 14 15 16 (dev-python/setuptools-30.4.0:0/0::gentoo, installed) pulled in by 17 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/certifi-2016.9.26:0/0::gentoo, installed) 18 19 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/chardet-2.3.0:0/0::gentoo, installed) 20 21 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/cryptography-1.7.1:0/0::gentoo, installed) 22 23 >=dev-python/setuptools-18.2[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/pip-7.1.2:0/0::gentoo, installed) 24 25 26dev-python/certifi:0 27 28 (dev-python/certifi-2018.4.16:0/0::gentoo, ebuild scheduled for merge) pulled in by 29 >=dev-python/certifi-2016.9.26[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/setuptools-40.6.3:0/0::gentoo, ebuild scheduled for merge) 30 31 32 (dev-python/certifi-2016.9.26:0/0::gentoo, installed) pulled in by 33 dev-python/certifi[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/urllib3-1.16:0/0::gentoo, installed) 34 35 >=dev-python/certifi-2016.9.26[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/setuptools-30.4.0:0/0::gentoo, installed) 36 37 38 39 40!!! The following installed packages are masked: 41- sys-devel/gcc-4.5.4::gentoo (masked by: package.mask) 42/usr/portage/profiles/package.mask: 43# Michał Górny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>, 44# Matthias Maier <tamiko@gentoo.org> (21 May 2017 and later updates) 45# These old versions of toolchain packages (binutils, gcc, glibc) are no 46# longer officially supported and are not suitable for general use. Using 47# these packages can result in build failures (and possible breakage) for 48# many packages, and may leave your system vulnerable to known security 49# exploits. 50# If you still use one of these old toolchain packages, please upgrade (and 51# switch the compiler / the binutils) ASAP. If you need them for a specific 52# (isolated) use case, feel free to unmask them on your system. 53 54- sys-devel/gcc-4.8.5::gentoo (masked by: package.mask) 55- sys-devel/binutils-2.29.1-r1::gentoo (masked by: package.mask) 56For more information, see the MASKED PACKAGES section in the emerge 57man page or refer to the Gentoo Handbook.

跟刚才的错误消息类似,glibc包的错误没有了,但是gcc的错误依然在:

- sys-devel/gcc-4.5.4::gentoo (masked by: package.mask)

那就更新 gcc吧,运行了命令:

sudo emerge sys-devel/gcc

这个命令运行了很久很久~~~

最后成功了安装了gcc的最新版本 sys-devel/gcc-7.3.0-r3

再次运行

sudo emerge -qav portage

然而结果还是跟没安装gcc之前一样,没有变化。

查看gss版本:

emerge -p --depclean sys-devel/gcc

结果如下

1Calculating dependencies... done! 2>>> Calculating removal order... 3 4>>> These are the packages that would be unmerged: 5 6 sys-devel/gcc 7 selected: 4.5.4 4.8.5 5.4.0-r3 6.4.0-r1 8 protected: none 9 omitted: 7.3.0-r3 10 11All selected packages: =sys-devel/gcc-5.4.0-r3 =sys-devel/gcc-4.8.5 =sys-devel/gcc-6.4.0-r1 =sys-devel/gcc-4.5.4 12 13>>> 'Selected' packages are slated for removal. 14>>> 'Protected' and 'omitted' packages will not be removed. 15 16Packages installed: 361 17Packages in world: 85 18Packages in system: 43 19Required packages: 357 20Number to remove: 4

没辙了,毅然决然删除旧版本gcc

1sudo emerge -C sys-devel/gcc-4.5.4 2sudo emerge -C sys-devel/gcc-4.8.5

成功删除!

再再再次运行

sudo emerge -qav portage

恩,这下结果有变,gcc的错误没有了

1!!! The following installed packages are masked: 2- sys-devel/binutils-2.29.1-r1::gentoo (masked by: package.mask) 3/usr/portage/profiles/package.mask: 4# Michał Górny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>, 5# Matthias Maier <tamiko@gentoo.org> (21 May 2017 and later updates) 6# These old versions of toolchain packages (binutils, gcc, glibc) are no 7# longer officially supported and are not suitable for general use. Using 8# these packages can result in build failures (and possible breakage) for 9# many packages, and may leave your system vulnerable to known security 10# exploits. 11# If you still use one of these old toolchain packages, please upgrade (and 12# switch the compiler / the binutils) ASAP. If you need them for a specific 13# (isolated) use case, feel free to unmask them on your system. 14 15For more information, see the MASKED PACKAGES section in the emerge 16man page or refer to the Gentoo Handbook.

这下改更新binutils了

sudo emerge sys-devel/binutils

binutils从 2.29.1-r1 更新到 2.30-r4,下面就删除旧版本

sudo emerge -C sys-devel/binutils-2.29.1-r1

再再再再次运行

sudo emerge -qav portage

这下错误信息只剩一种了:

1!!! Multiple package instances within a single package slot have been pulled 2!!! into the dependency graph, resulting in a slot conflict: 3 4dev-python/setuptools:0 5 6 (dev-python/setuptools-40.6.3:0/0::gentoo, ebuild scheduled for merge) pulled in by 7 >=dev-python/setuptools-34[python_targets_pypy(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (app-portage/gemato-14.0:0/0::gentoo, ebuild scheduled for merge) 8 ^^ ^^ 9 dev-python/setuptools[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/pyblake2-1.1.2:0/0::gentoo, ebuild scheduled for merge) 10 11 dev-python/setuptools[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/certifi-2018.4.16:0/0::gentoo, ebuild scheduled for merge) 12 13 dev-python/setuptools[python_targets_pypy(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (app-portage/gemato-14.0:0/0::gentoo, ebuild scheduled for merge) 14 15 16 (dev-python/setuptools-30.4.0:0/0::gentoo, installed) pulled in by 17 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/certifi-2016.9.26:0/0::gentoo, installed) 18 19 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/chardet-2.3.0:0/0::gentoo, installed) 20 21 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/cryptography-1.7.1:0/0::gentoo, installed) 22 23 >=dev-python/setuptools-18.2[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/pip-7.1.2:0/0::gentoo, installed) 24 25 26dev-python/certifi:0 27 28 (dev-python/certifi-2018.4.16:0/0::gentoo, ebuild scheduled for merge) pulled in by 29 >=dev-python/certifi-2016.9.26[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/setuptools-40.6.3:0/0::gentoo, ebuild scheduled for merge) 30 31 32 (dev-python/certifi-2016.9.26:0/0::gentoo, installed) pulled in by 33 dev-python/certifi[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/urllib3-1.16:0/0::gentoo, installed) 34 35 >=dev-python/certifi-2016.9.26[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/setuptools-30.4.0:0/0::gentoo, installed)

这个里面的重点错误消息是:

1!!! Multiple package instances within a single package slot have been pulled 2!!! into the dependency graph, resulting in a slot conflict:

于是google了第一句出错消息,果然有很多人遇到类似情况,看着大家建议更新标注的那些包, 我这边就是 dev-python/setuptools:0 和  dev-python/certifi:0

于是乎就一一更新

sudo emerge dev-python/setuptools

运行结果跟上一个命令 ` sudo emerge -qav portage ` 一样,没有变化。

傻傻又更新一次另外一个包:

sudo emerge dev-python/certifi

还是同样结果~~

不能放弃,眼看就要成功了!

又google了下,运行

sudo emerge --ask --oneshot  dev-python/setuptools-30.4.0 dev-python/certifi-2016.9.26

提示如下,这个错误有点low:

1!!! 'dev-python/setuptools-30.4.0' is not a valid package atom. 2!!! Please check ebuild(5) for full details.

我有点病急乱投医了,整个过程都是在尝试,尝试。

恩,再试,更新 setuptools

sudo emerge -u dev-python/setuptools

命令结果如下:

1dev-python/certifi:0 2 3 (dev-python/certifi-2018.4.16:0/0::gentoo, ebuild scheduled for merge) conflicts with 4 >=dev-python/certifi-2016.9.26[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/setuptools-30.4.0:0/0::gentoo, installed) 5 6 dev-python/certifi[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/urllib3-1.16:0/0::gentoo, installed) 7 8 9dev-python/setuptools:0 10 11 (dev-python/setuptools-40.6.3:0/0::gentoo, ebuild scheduled for merge) conflicts with 12 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/certifi-2016.9.26:0/0::gentoo, installed) 13 14 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/chardet-2.3.0:0/0::gentoo, installed) 15 16 dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/cryptography-1.7.1:0/0::gentoo, installed) 17 18 >=dev-python/setuptools-18.2[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/pip-7.1.2:0/0::gentoo, installed) 19 20 21>>> Recording dev-python/setuptools in "world" favorites file... 22>>> Auto-cleaning packages... 23 24>>> No outdated packages were found on your system.  

额,要不从最后一个下手:

required by (dev-python/pip-7.1.2:0/0::gentoo, installed)

更新pip

sudo emerge -u dev-python/pip

恩!更新成功,还是有望搞定的。

返回运行

sudo emerge -u dev-python/setuptools

哇,竟然没有错误了,这么神奇

再再再再再运行那个万恶之源的命令

sudo emerge -qav portage

惊喜,意外,提示我可以更新了!!!!!

1...... 2[ebuild N ] app-crypt/pinentry-1.1.0-r2 USE="ncurses -caps -emacs -fltk -gnome-keyring -gtk -qt5 -static" 3[ebuild N ] dev-python/bz2file-0.98 PYTHON_TARGETS="python2_7 (-pypy)" 4[ebuild N ] app-crypt/gnupg-2.2.10 USE="bzip2 nls readline smartcard ssl -doc -ldap (-selinux) -tofu -tools -usb -wks-server" 5[ebuild N ] dev-python/pyblake2-1.1.2 PYTHON_TARGETS="python2_7 python3_6 (-pypy) (-pypy3) -python3_4 -python3_5 (-python3_7)" 6[ebuild N ] app-portage/gemato-14.0 USE="blake2 bzip2 gpg -lzma -sha3 -test -tools" PYTHON_TARGETS="python2_7 python3_6 (-pypy) -python3_4 -python3_5 (-python3_7)" 7[ebuild R ] sys-apps/portage-2.3.51-r1 USE="(ipc) native-extensions rsync-verify* xattr -build -doc -epydoc -gentoo-dev (-selinux)" PYTHON_TARGETS="python2_7 python3_6 (-pypy) -python3_4 -python3_5 (-python3_7)" 8 9Would you like to merge these packages? [Yes/No] yes 10>>> Verifying ebuild manifests 11>>> Emerging (1 of 18) app-crypt/openpgp-keys-gentoo-release-20190102::gentoo 12>>> Installing (1 of 18) app-crypt/openpgp-keys-gentoo-release-20190102::gentoo 13>>> Emerging (2 of 18) dev-libs/libunistring-0.9.10::gentoo 14>>> Installing (2 of 18) dev-libs/libunistring-0.9.10::gentoo 15>>> Emerging (3 of 18) dev-libs/libgpg-error-1.29::gentoo 16>>> Installing (3 of 18) dev-libs/libgpg-error-1.29::gentoo 17>>> Emerging (4 of 18) dev-libs/libassuan-2.5.1::gentoo 18>>> Installing (4 of 18) dev-libs/libassuan-2.5.1::gentoo

至此,portage更新成功,

返回安装letsencrypt需要的包,

sudo emerge -av app-crypt/certbot app-crypt/certbot-nginx

成功!!!

 下面就跟着certbot官网教程来安装免费SSL啦,Yeah!!

https://certbot.eff.org/lets-encrypt/gentoo-nginx

点赞
收藏

评论区

加载中...

相关推荐

MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1

文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s

Oracle 分组与拼接字符串同时使用

SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(

MySQL部分从库上面因为大量的临时表tmp_table造成慢查询

背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_

皕杰报表之UUID

​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为

手写Java HashMap源码

HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22

swap空间的增减方法

(1)增大swap空间去激活swap交换区:swapoff v /dev/vg00/lvswap扩展交换lv:lvextend L 10G /dev/vg00/lvswap重新生成swap交换区:mkswap /dev/vg00/lvswap激活新生成的交换区:swapon v /dev/vg00/lvswap