首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >apt坏掉没有安装候选和更新没有发布文件。

apt坏掉没有安装候选和更新没有发布文件。
EN

Unix & Linux用户
提问于 2021-11-07 06:24:24
回答 1查看 899关注 0票数 0

我的apt和包经理完全坏了。

错误信息:

代码语言:javascript
复制
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.

当我试图更新我的存储库时,它说

代码语言:javascript
复制
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?)

这是我的sources.list

代码语言:javascript
复制
# 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

代码语言:javascript
复制
docker.list  docker.list.save  skype-stable.list  skype-stable.list.save  vscode.list  vscode.list.save

当我试图安装像tor apt这样的简单软件包时,请说以下错误:

代码语言:javascript
复制
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

不过,我怎样才能修好它呢?

EN

回答 1

Unix & Linux用户

发布于 2021-11-07 10:44:06

你是混血儿和斗牛士。读别做FrankenDebian

tor软件包无法安装,因为main存储库没有同时设置在buster和bullseye上。

相应地将您的sources.list编辑为debian wiki

命令行:

代码语言:javascript
复制
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:

代码语言:javascript
复制
cat <<EOF | sudo tee /etc/apt/preferences.d/pinning
Package: *
Pin: release a=buster
Pin-Priority: 1001
EOF

然后跑:

代码语言:javascript
复制
sudo apt update && sudo apt dist-upgrade

注意:从source.list中删除vscode,因为它已经在sources.list.d/下存在。

/etc/apt/sources.list.d/下添加本地存储库:

代码语言:javascript
复制
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

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/676494

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档