gpt4 book ai didi

CentOS Stream 8 - DNF 损坏 - 无法运行更新/升级

转载 作者:行者123 更新时间:2023-12-04 19:39:31 27 4
gpt4 key购买 nike

我以为我已成功从 CentOS8 升级到 Centos Stream 8,但我始终无法让 dnf distro-sync 工作。现在 DNF 似乎已损坏,并且 dnf upgrade 引发了与 DNF 本身相关的 libsmartcols.so.1 的不满意依赖项。
dnf 发行版同步:
运行同步时,将显示以下内容:

Error: 
Problem: The operation would result in removing the following protected packages: setup
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
我尝试了 --skip-broken、--nobest --allowerasing 等所有可能的组合来解决。尝试使用保险库版本,没有区别。所有旧的 CentOS 存储库都已删除,因此/etc/yum.repos.d/文件夹中的唯一存储库是 -Stream-。我目前没有安装任何 EPEL 存储库。
cat/etc/centos-release => CentOS Stream 第 8 版
服务器在重新启动后仍然存在,并且似乎可以正常工作。
运行 dnf -y upgrade -v 时,结果如下:
dnf -y upgrade -v
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync
DNF version: 4.7.0
cachedir: /var/cache/dnf
User-Agent: constructed: 'libdnf (CentOS Stream 8; generic; Linux.x86_64)'
repo: using cache for: appstream
appstream: using metadata from Tue 08 Feb 2022 07:27:22 PM EST.
repo: using cache for: baseos
baseos: using metadata from Tue 08 Feb 2022 07:26:22 PM EST.
repo: using cache for: extras
extras: using metadata from Tue 08 Feb 2022 04:08:34 PM EST.
Last metadata expiration check: 0:26:35 ago on Thu 10 Feb 2022 12:44:57 PM EST.
--> Starting dependency resolution
---> Package dnf-plugins-core.noarch 4.0.21-8.el8 will be upgraded
---> Package dnf-plugins-core.noarch 4.0.21-10.el8 will be an upgrade
---> Package libdnf.x86_64 0.63.0-5.el8 will be upgraded
---> Package libdnf.x86_64 0.63.0-7.el8 will be an upgrade
---> Package python3-dnf-plugins-core.noarch 4.0.21-8.el8 will be upgraded
---> Package python3-dnf-plugins-core.noarch 4.0.21-10.el8 will be an upgrade
---> Package python3-hawkey.x86_64 0.63.0-5.el8 will be upgraded
---> Package python3-hawkey.x86_64 0.63.0-7.el8 will be an upgrade
---> Package python3-libdnf.x86_64 0.63.0-5.el8 will be upgraded
---> Package python3-libdnf.x86_64 0.63.0-7.el8 will be an upgrade
--> Finished dependency resolution
Dependencies resolved.
==============================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================
Upgrading:
dnf-plugins-core noarch 4.0.21-10.el8 baseos 71 k
libdnf x86_64 0.63.0-7.el8 baseos 701 k
python3-dnf-plugins-core noarch 4.0.21-10.el8 baseos 230 k
python3-hawkey x86_64 0.63.0-7.el8 baseos 116 k
python3-libdnf x86_64 0.63.0-7.el8 baseos 778 k

Transaction Summary
==============================================================================================================================================================================================================
Upgrade 5 Packages

Total size: 1.9 M
Downloading Packages:
[SKIPPED] dnf-plugins-core-4.0.21-10.el8.noarch.rpm: Already downloaded
[SKIPPED] libdnf-0.63.0-7.el8.x86_64.rpm: Already downloaded
[SKIPPED] python3-dnf-plugins-core-4.0.21-10.el8.noarch.rpm: Already downloaded
[SKIPPED] python3-hawkey-0.63.0-7.el8.x86_64.rpm: Already downloaded
[SKIPPED] python3-libdnf-0.63.0-7.el8.x86_64.rpm: Already downloaded
Using rpmkeys executable at /usr/bin/rpmkeys to verify signatures
Running transaction check
Error: transaction check vs depsolve:
libsmartcols.so.1()(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.25)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.28)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.29)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.30)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1()(64bit) is needed by python3-hawkey-0.63.0-7.el8.x86_64
libsmartcols.so.1()(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.25)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.27)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.28)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.29)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.30)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
To diagnose the problem, try running: 'rpm -Va --nofiles --nodigest'.
You probably have corrupted RPMDB, running 'rpm --rebuilddb' might fix the issue.
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
我已经尝试清理包(dnf clean all),删除缓存文件,单独尝试更新/升级每个包等。我没有想法。
有什么建议么?

最佳答案

经过几个小时的尝试,我能够通过执行以下操作来解决它:

  • 从另一台服务器复制 CentOS-Base.repo 文件
  • 编辑 repo 文件以反射(reflect) vault.centos.org 的位置,关闭 gpgcheck
  • dnf 清理所有
  • dnf 安装 libsmartcols-2.32.1-28.el8

  • 再次运行 dnf -y upgrade ,它起作用了。去搞清楚。
    希望这将帮助其他有相同或类似问题的人。

    关于CentOS Stream 8 - DNF 损坏 - 无法运行更新/升级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71070277/

    27 4 0