Centos
Centos 7:yum 更新錯誤 glib2 更新錯誤
我嘗試在我的 CentOS 機器上執行更新並遇到了問題。我最後一次執行更新是在 2018 年 1 月,然後是昨天,2018 年 6 月 19 日。
# yum update ... --> Finished Dependency Resolution Error: Package: 1:NetworkManager-1.10.2-14.el7_5.x86_64 (updates) Requires: glib2 >= 2.54.2 Installed: glib2-2.50.3-3.el7.x86_64 (@base) glib2 = 2.50.3-3.el7 Error: Package: 1:NetworkManager-glib-1.10.2-14.el7_5.x86_64 (updates) Requires: libdbus-1.so.3(LIBDBUS_1_3)(64bit) Error: Package: python2-ipalib-4.5.4-10.el7.centos.1.noarch (updates) Requires: python-netaddr >= 0.7.5-9 Installed: python-netaddr-0.7.5-7.el7.noarch (@anaconda) python-netaddr = 0.7.5-7.el7 Error: Package: gtk3-3.22.26-4.el7_5.x86_64 (updates) Requires: libwayland-client(x86-64) >= 1.9.91 Installing: libwayland-client-1.5.0-4.el7.nux.x86_64 (nux-dextop) libwayland-client(x86-64) = 1.5.0-4.el7.nux Error: Package: libvirt-daemon-3.9.0-14.el7_5.5.x86_64 (updates) Requires: libdbus-1.so.3(LIBDBUS_1_3)(64bit) Error: Package: selinux-policy-targeted-3.13.1-192.el7_5.3.noarch (updates) Requires: policycoreutils >= 2.5-18 Installed: policycoreutils-2.5-17.1.el7.x86_64 (@base) policycoreutils = 2.5-17.1.el7 Error: Package: xorgxrdp-0.2.6-2.el7.x86_64 (epel) Requires: xorg-x11-server-Xorg(x86-64) = 1.19.5 Installed: xorg-x11-server-Xorg-1.19.3-11.el7.x86_64 (@base) xorg-x11-server-Xorg(x86-64) = 1.19.3-11.el7 Error: Package: libvirt-daemon-driver-nwfilter-3.9.0-14.el7_5.5.x86_64 (updates) Requires: libdbus-1.so.3(LIBDBUS_1_3)(64bit) Error: Package: gtk3-3.22.26-4.el7_5.x86_64 (updates) Requires: libwayland-cursor(x86-64) >= 1.9.91 Installing: libwayland-cursor-1.5.0-4.el7.nux.x86_64 (nux-dextop) libwayland-cursor(x86-64) = 1.5.0-4.el7.nux Error: Package: libvirt-daemon-driver-network-3.9.0-14.el7_5.5.x86_64 (updates) Requires: libdbus-1.so.3(LIBDBUS_1_3)(64bit) Error: Package: gtk3-3.22.26-4.el7_5.x86_64 (updates) Requires: libwayland-egl.so.1()(64bit) Error: Package: openscap-1.2.16-8.el7_5.x86_64 (updates) Requires: libdbus-1.so.3(LIBDBUS_1_3)(64bit) Error: Package: selinux-policy-3.13.1-192.el7_5.3.noarch (updates) Requires: policycoreutils >= 2.5-18 Installed: policycoreutils-2.5-17.1.el7.x86_64 (@base) policycoreutils = 2.5-17.1.el7 Error: Package: gtk3-3.22.26-4.el7_5.x86_64 (updates) Requires: libwayland-cursor(x86-64) >= 1.9.91 Available: libwayland-cursor-1.5.0-4.el7.nux.x86_64 (nux-dextop) libwayland-cursor(x86-64) = 1.5.0-4.el7.nux Error: Package: libvirt-libs-3.9.0-14.el7_5.5.x86_64 (updates) Requires: libdbus-1.so.3(LIBDBUS_1_3)(64bit) Error: Package: gtk3-3.22.26-4.el7_5.x86_64 (updates) Requires: libwayland-client(x86-64) >= 1.9.91 Available: libwayland-client-1.5.0-4.el7.nux.x86_64 (nux-dextop) libwayland-client(x86-64) = 1.5.0-4.el7.nux Error: Package: certmonger-0.78.4-3.el7_5.1.x86_64 (updates) Requires: libdbus-1.so.3(LIBDBUS_1_3)(64bit)
如果我手動更新 glib2,第一個錯誤,我得到:
[root@datamover102 .hts]# yum install glib2.x86_64 Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.oit.uci.edu * epel: mirrors.develooper.com * extras: mirror.sfo12.us.leaseweb.net * nux-dextop: mirror.li.nux.ro * updates: repos.lax.quadranet.com Package glib2-2.50.3-3.el7.x86_64 already installed and latest version Nothing to do
Yum 覺得 glib2 是最新版本,同時又說 2.54 是最低要求。我相信 2.56 是最新版本,基於快速Google搜尋。
我試過
yum remove glib2
了,但這並沒有去任何地方。我也嘗試過package-clean --dupes
,這是我閱讀的一篇文章的推薦解決方案。那個輸出什麼都沒有。還有其他錯誤。
這是軟體更新 GUI 的螢幕截圖,一個更好的視圖。
更新 1
第一個建議的答案不起作用,這是輸出。
[root@datamover102 .hts]# yum install glib2-2.54.2.x86_64 Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.oit.uci.edu * epel: mirrors.develooper.com * extras: mirror.sfo12.us.leaseweb.net * nux-dextop: mirror.li.nux.ro * updates: repos.lax.quadranet.com No package glib2-2.54.2.x86_64 available. Error: Nothing to do [root@datamover102 .hts]#
更新 2
我有幾台 CentOS 7 機器,其中兩台需要更新,自 2018 年 1 月以來一直沒有更新。第一台機器 101 完美更新,沒有問題,而第二台機器 102 出現問題。我剛決定做一個清單,這被證明很有趣,注意使用的不同回購。
`BAD` [root@datamover102 yum.repos.d]# yum list glib2 Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.oit.uci.edu * epel: mirrors.develooper.com * extras: mirror.sfo12.us.leaseweb.net * nux-dextop: mirror.li.nux.ro * updates: repos.lax.quadranet.com Installed Packages glib2.x86_64 2.50.3-3.el7 @base Available Packages glib2.i686 2.50.3-3.el7 base GOOD [root@datamover101 yum.repos.d]# yum list glib2 Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: centos-distro.cavecreek.net * epel: mirrors.develooper.com * extras: mirror.sfo12.us.leaseweb.net * nux-dextop: mirror.li.nux.ro * updates: centos.mirror.ndchost.com Installed Packages glib2.x86_64 2.54.2-2.el7 @base Available Packages glib2.i686 2.54.2-2.el7 base [root@datamover101 yum.repos.d]#
基本上,壞機器
base: mirrors.oit.uci.edu
用作底座,而好機器centos-distro.cavecreek.net
用作底座。答案是讓壞機器不使用 mirrors.oit.uci.edu 作為基礎。這是一個列表,在兩台機器上都匹配。
[root@datamover102 yum.repos.d]# ls -la total 56 drwxr-xr-x. 2 root root 252 Jun 20 16:38 . drwxr-xr-x. 144 root root 8192 Jun 20 15:33 .. -rw-r--r-- 1 root root 1664 May 17 06:53 CentOS-Base.repo -rw-r--r--. 1 root root 1309 Sep 27 2017 CentOS-CR.repo -rw-r--r-- 1 root root 649 May 17 06:53 CentOS-Debuginfo.repo -rw-r--r-- 1 root root 314 May 17 06:53 CentOS-fasttrack.repo -rw-r--r-- 1 root root 630 May 17 06:53 CentOS-Media.repo -rw-r--r-- 1 root root 1331 May 17 06:53 CentOS-Sources.repo -rw-r--r-- 1 root root 4768 May 17 06:53 CentOS-Vault.repo -rw-r--r-- 1 root root 951 Oct 2 2017 epel.repo -rw-r--r-- 1 root root 1050 Oct 2 2017 epel-testing.repo -rw-r--r--. 1 root root 477 Jul 31 2014 nux-dextop.repo
我做了更多的研究並打開了這個頁面。那篇文章的相關部分是這樣的:
8.1. Disabling or Removing Package Sources Set enable=0 in a definition file to prevent yum from using that repository. The yum utility ignores any definition file with this setting. To completely remove access to a repository: Delete the relevant file from /etc/yum.repos.d/. Delete the cache directory from /var/cache/yum/.
根據我從 101 和 102下載的目錄到我的 Windows 框,我做了第一步,通過設置
enabled = 0
。Araxis Merge 發現了這一差異。CentOS-CR.repo``/etc/yum.repos.d
在那之後重新啟動電腦並沒有起到作用,但是
x8x_64
從中刪除目錄/var/cache/yum
確實起到了作用。然後我做了一個:# yum update glib2.x86_64 (a success to 2.54)
其次是:
# yum update