在一次安装中,dnf
设法升级了该内核。在较新的机器上(今天安装和升级),它失败了。不知道为什么……
这是一个完整的运行:
; sudo dnf upgrade -y
Last metadata expiration check: 5:42:13 ago on Wed 06 Mar 2019 10:56:30 GMT.
Dependencies resolved.
Problem 1: cannot install both kernel-3.10.0-957.5.1.el7.x86_64 and kernel-3.10.0-957.5.1.el7.x86_64
- cannot install the best update candidate for package kernel-3.10.0-957.5.1.el7.x86_64
- cannot install the best update candidate for package kernel-3.10.0-957.el7.x86_64
Problem 2: cannot install both kernel-devel-3.10.0-957.5.1.el7.x86_64 and kernel-devel-3.10.0-957.5.1.el7.x86_64
- cannot install the best update candidate for package kernel-devel-3.10.0-957.5.1.el7.x86_64
- cannot install the best update candidate for package kernel-devel-3.10.0-957.el7.x86_64
================================================================================
Package Arch Version Repository Size
================================================================================
Reinstalling:
kernel x86_64 3.10.0-957.5.1.el7 updates 48 M
kernel-devel x86_64 3.10.0-957.5.1.el7 updates 17 M
replacing kernel-devel.x86_64 3.10.0-957.5.1.el7
Transaction Summary
================================================================================
Total size: 65 M
Downloading Packages:
[SKIPPED] kernel-3.10.0-957.5.1.el7.x86_64.rpm: Already downloaded
[SKIPPED] kernel-devel-3.10.0-957.5.1.el7.x86_64.rpm: Already downloaded
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Reinstalling : kernel-devel-3.10.0-957.5.1.el7.x86_64 1/4
Running scriptlet: kernel-devel-3.10.0-957.5.1.el7.x86_64 1/4
Reinstalling : kernel-3.10.0-957.5.1.el7.x86_64 2/4
Running scriptlet: kernel-3.10.0-957.5.1.el7.x86_64 2/4
Obsoleting : kernel-devel-3.10.0-957.5.1.el7.x86_64 3/4
Running scriptlet: kernel-3.10.0-957.5.1.el7.x86_64 4/4
Cleanup : kernel-3.10.0-957.5.1.el7.x86_64 4/4
Running scriptlet: kernel-3.10.0-957.5.1.el7.x86_64 4/4
Verifying : kernel-3.10.0-957.5.1.el7.x86_64 1/5
Verifying : kernel-3.10.0-957.5.1.el7.x86_64 2/5
Verifying : kernel-devel-3.10.0-957.5.1.el7.x86_64 3/5
Verifying : kernel-devel-3.10.0-957.el7.x86_64 4/5
Verifying : kernel-devel-3.10.0-957.5.1.el7.x86_64 5/5
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Traceback (most recent call last):
File "/bin/dnf", line 58, in <module>
main.user_main(sys.argv[1:], exit_code=True)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 179, in user_main
errcode = main(args)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 64, in main
return _main(base, args, cli_class, option_parser_class)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 99, in _main
return cli_run(cli, base)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 123, in cli_run
ret = resolving(cli, base)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 154, in resolving
base.do_transaction(display=displays)
File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 240, in do_transaction
tid = super(BaseCli, self).do_transaction(display)
File "/usr/lib/python2.7/site-packages/dnf/base.py", line 872, in do_transaction
tid = self._run_transaction(cb=cb)
File "/usr/lib/python2.7/site-packages/dnf/base.py", line 1021, in _run_transaction
self._verify_transaction(cb.verify_tsi_package)
File "/usr/lib/python2.7/site-packages/dnf/base.py", line 1059, in _verify_transaction
self.history.end(rpmdbv, 0)
File "/usr/lib/python2.7/site-packages/dnf/db/history.py", line 504, in end
bool(return_code)
File "/usr/lib64/python2.7/site-packages/libdnf/transaction.py", line 758, in endTransaction
return _transaction.Swdb_endTransaction(self, dtEnd, rpmdbVersionEnd, state)
RuntimeError: TransactionItem state is not set: kernel-devel-3.10.0-957.el7.x86_64
根据评论者的要求:
; dnf repolist
Extra Packages for Enterprise Linux 7 - x86_64 3.6 MB/s | 16 MB 00:04
CentOS-7 - Base 5.6 MB/s | 10 MB 00:01
CentOS-7 - Updates 4.1 MB/s | 5.2 MB 00:01
IUS Community Packages for Enterprise Linux 7 - 3.9 MB/s | 941 kB 00:00
slack 29 kB/s | 33 kB 00:01
CentOS-7 - Extras 1.2 MB/s | 339 kB 00:00
repo id repo name status
base CentOS-7 - Base 10,019
*epel Extra Packages for Enterprise Linux 7 - x86_64 13,008
extras CentOS-7 - Extras 382
ius IUS Community Packages for Enterprise Linux 7 - x86_64 570
slack slack 47
updates CentOS-7 - Updates 1,457
和
; dnf repolist -v | grep "^Repo-filename" | awk '{print $2}' | sort ; ls /etc/yum.repos.d
/etc/yum.repos.d/CentOS-Base.repo
/etc/yum.repos.d/CentOS-Base.repo
/etc/yum.repos.d/CentOS-Base.repo
/etc/yum.repos.d/epel.repo
/etc/yum.repos.d/ius.repo
/etc/yum.repos.d/slack.repo
total 60K
4.0K CentOS-Base.repo 8.0K CentOS-Vault.repo 4.0K ius-archive.repo
4.0K CentOS-CR.repo 4.0K CentOS-fasttrack.repo 4.0K ius-dev.repo
4.0K CentOS-Debuginfo.repo 4.0K epel.repo 4.0K ius-testing.repo
4.0K CentOS-Media.repo 4.0K epel-testing.repo 4.0K slack.repo
4.0K CentOS-Sources.repo 4.0K ius.repo
据我和Sardathrion 所知,我们正在共同解决当前在我们各自的EL7 发行版中发布的版本的dnf 损坏。
basic_string::_S_construct null not valid, ignoring this repo
当我得到一个(我不能把它放在 dnf 代码中)时,Sardathrion 得到一个 Python 回溯。在这两种情况下,我们都看到 dnf 将自己与cannot install both <kernel> and <same-kernel>
消息混淆并做了意想不到的事情。就我而言,当我通过发出 dnf 降级时,我的症状消失了
在 Scientific Linux 7.6 上将 dnf 从 4.0.9 降低到 2.7.5。我在 CentOS 保险库中看到相同的 SRPM,这表明 CentOS 用户应该能够这样做。
由于我在 Fedora 29 发布的 dnf 4.1.0 中没有观察到任何此类问题,因此在我们 ping libdnf 维护者之前,我们的第一条后续行动应该是与我们的发行版维护者联系。
编辑:TUV 知道 dnf 提供重新安装过时内核的问题。它没有解决我禁用的
sl
存储库,我也不知道它是否修复了 Sardathrion 的大回溯。