使用以下命令运行更新:
apt-get update
返回:
Hit:1 http://kali.download/kali kali-rolling InRelease
Traceback (most recent call last):
File "/usr/lib/cnf-update-db", line 27, in <module>
col.create(db)
File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 95, in create
self._fill_commands(con)
File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 143, in _fill_commands
self._parse_single_contents_file(con, f, fp.stdout)
File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 282, in _parse_single_contents_file
priority = component_priorities[component]
KeyError: 'non-free-firmware'
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'谁能解释一下回溯吗?
发布于 2023-02-15 20:05:07
Kali有一个新的部分,non-free-firmware,但是您所拥有的command-not-found版本并不知道它(它是在23.04.0版中添加)。
若要解决此问题,请禁用钩子:
sudo mv /etc/apt/apt.conf.d/50command-not-found{,.disabled}然后,您将能够像往常一样运行apt update。一旦您有了固定版本的command-not-found,重新启用钩子:
sudo mv /etc/apt/apt.conf.d/50command-not-found{.disabled,}https://unix.stackexchange.com/questions/735657
复制相似问题