我的 apt 和包管理器完全损坏了。
错误消息:
Package 'package' has no installation candidate
Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:62::644). - connect (101: Network is unreachable)
stable InRelease' does not seem to provide it (sources.list entry misspelt?)
Updating from such a repository can't be done securely, and is therefore disabled by default.
etc.
当我尝试更新我的存储库时,它说
Err:1 http://packages.microsoft.com/repos/code stable InRelease
Could not connect to packages.microsoft.com:80 (104.214.230.139). - connect (113: No route to host)
Err:2 http://debian.ec.as6453.net/debian testing InRelease
Could not connect to debian.ec.as6453.net:80 (64.86.226.70). - connect (113: No route to host) Cannot initiate the connection to debian.ec.as6453.net:80 (2001:5a0:1900:102:64:86:226:70). - connect (101: Network is unreachable)
Ign:3 http://deb.debian.org/debian buster-updates InRelease
Ign:4 http://deb.debian.org/debian bullseye InRelease
Err:5 http://deb.debian.org/debian buster-updates Release
Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:1c::644). - connect (101: Network is unreachable)
Err:6 http://deb.debian.org/debian bullseye Release
Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:1c::644). - connect (101: Network is unreachable)
Hit:7 https://packages.microsoft.com/repos/vscode stable InRelease
Hit:8 https://download.docker.com/linux/debian buster InRelease
Hit:9 https://repo.skype.com/deb stable InRelease
Err:10 http://security.debian.org/debian-security buster/updates InRelease
Could not connect to debian.map.fastlydns.net:80 (199.232.138.132). - connect (113: No route to host) Cannot initiate the connection to debian.map.fastlydns.net:80 (2a04:4e42:62::644). - connect (101: Network is unreachable) Could not connect to security.debian.org:80 (151.101.2.132). - connect (113: No route to host) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:400::644). - connect (101: Network is unreachable) Could not connect to security.debian.org:80 (151.101.66.132). - connect (113: No route to host) Cannot initiate the connection to security.debian.org:80 (2a04:4e42::644). - connect (101: Network is unreachable) Could not connect to security.debian.org:80 (151.101.130.132). - connect (113: No route to host) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:600::644). - connect (101: Network is unreachable) Could not connect to security.debian.org:80 (151.101.194.132). - connect (113: No route to host) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:200::644). - connect (101: Network is unreachable)
Err:11 http://((My.Local.Company.Domain.Name))/mirror.aminidc.com/debian stable InRelease
Connection failed [IP: 192.168.0.5 80]
Reading package lists... Done
E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://deb.debian.org/debian bullseye Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Skipping acquire of configured file 'main/source/Sources' as repository 'https://packages.microsoft.com/repos/vscode stable InRelease' does not seem to provide it (sources.list entry misspelt?)
这是我的来源列表
# deb cdrom:[Debian GNU/Linux 10.3.0 _Buster_ - Official amd64 DVD Binary-1 20200208-12:08]/ buster contrib main
# deb cdrom:[Debian GNU/Linux 10.3.0 _Buster_ - Official amd64 DVD Binary-1 20200208-12:08]/ buster contrib main
# Line commented out by installer because it failed to verify:
deb http://security.debian.org/debian-security buster/updates main contrib
# Line commented out by installer because it failed to verify:
deb-src http://security.debian.org/debian-security buster/updates main contrib
# buster-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://deb.debian.org/debian/ buster-updates main contrib
deb-src http://deb.debian.org/debian/ buster-updates main contrib
deb http://debian.ec.as6453.net/debian/ testing main contrib
deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
deb-src [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
deb http://((My.Local.Company.Domain.Name))/mirror.aminidc.com/debian stable main contrib non-free
deb http://deb.debian.org/debian/ bullseye non-free
这是ls
我的sources.list.d
docker.list docker.list.save skype-stable.list skype-stable.list.save vscode.list vscode.list.save
当我尝试安装像 tor apt 这样的简单软件包时,会出现以下错误:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package tor is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'tor' has no installation candidate
但是我该如何解决它?
答案1
你混合了破坏者和靶心。读不要制作 FrankenDebian。
无法安装 .tor 包,因为main
没有在 buster 和 bullseye 上设置存储库。
相应地编辑您的sources.listDebian 维基。
命令行:
cat <<EOF |sudo tee /etc/apt/sources.list
deb http://deb.debian.org/debian buster main contrib non-free
deb-src http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian-security/ buster/updates main contrib non-free
deb-src http://deb.debian.org/debian-security/ buster/updates main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb-src http://deb.debian.org/debian buster-updates main contrib non-free
EOF
将引脚破坏器设置为 1001:
cat <<EOF | sudo tee /etc/apt/preferences.d/pinning
Package: *
Pin: release a=buster
Pin-Priority: 1001
EOF
然后运行:
sudo apt update && sudo apt dist-upgrade
笔记:从 vscode 中删除,source.list
因为它已经存在于sources.list.d/
.
在以下位置添加您的本地存储库/etc/apt/sources.list.d/
:
cat <<EOF |sudo tee /etc/apt/sources.list.d/local.list
deb http://((My.Local.Company.Domain.Name))/mirror.aminidc.com/debian stable main contrib non-free
EOF
然后运行sudo apt update