我正在运行Kali Linux。每当我运行apt-get upgrade时,我都会得到以下错误。我试过apt --fix-broken install。不起作用。
apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
autopsy : Depends: binutils but it is not installed
clang-11 : Depends: binutils but it is not installed
clang-9 : Depends: binutils but it is not installed
dpkg-dev : Depends: binutils but it is not installed
gcc-10 : Depends: binutils (>= 2.35.1) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).我得到这个作为输出:
After this operation, 16.2 MB of additional disk space will be used. Do you want to continue? [Y/n] y
Err:1 http.kali.org/kali kali-rolling/main amd64 gcc-12-base amd64 12.2.0-11 404 Not Found [IP: 192.99.200.113 443]它说了23遍类似的话。然后上面写着
E: Failed to fetch http.kali.org/kali/pool/main/g/gcc-12/… 404 Not Found [IP: 192.99.200.113 443]发布于 2023-02-08 22:07:33
你可能把卡利的装置弄坏了。(这既不是Debian也不是Ubuntu,而是专为熟悉基于Linux系统的专业戊酯而设计的发行版。)
尝试从google-chrome.list中删除/etc/apt/sources.d。如果幸运的话,您没有过多地破坏Kali发行版,这两个命令将使您回到正确的轨道上来
apt update
apt full-upgrade有关上下文,请阅读Kali自己关于存储库的文档,特别是题为“非卡利存储库”的部分,
…将其他操作系统的存储库添加到Kali中(例如试图将Ubuntu放在Kali上),会破坏您的安装。这是Kali Linux系统崩溃的一个最常见的原因。
发布于 2023-02-08 21:46:42
Err:1 http.kali.org/kali kali-rolling/main amd64 gcc-12-base amd64 12.2.0-11 404 Not Foundapt正在尝试下载存储库中不存在的gcc-12-base_12.2.0-11_amd64.deb,尽管12.2.0-9和12.2.0-14版本都是这样。
这很可能意味着您正在尝试使用过时的包目录运行apt-get --fix-broken install。
首先用apt-get update更新包目录,这样apt-get就会知道存储库实际有哪些数据包。然后可以运行apt-get --fix-broken install,然后apt-get upgrade也可以工作。
https://unix.stackexchange.com/questions/734826
复制相似问题