0

My apt and package manager is completely broken.

Error messages :

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.

When I try to update my repositories it says

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?)

This is my sources.list

# 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

And this is ls of my sources.list.d

docker.list  docker.list.save  skype-stable.list  skype-stable.list.save  vscode.list  vscode.list.save

When I try to install a simple package like tor apt say following error :

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

However how can I fix it ?

1 Answer 1

1

You have mixed buster and bullseye. Read Don't make a FrankenDebian.

tor package cannot be installed because main repository isn't set on both buster and bullseye.

Edit your sources.list accordingly to debian wiki.

Command line:

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

pin buster to 1001:

cat <<EOF | sudo tee /etc/apt/preferences.d/pinning
Package: *
Pin: release a=buster
Pin-Priority: 1001
EOF

Then run:

sudo apt update && sudo apt dist-upgrade

note: vscode removed from source.list because it is already exist under sources.list.d/.

Add your local repository under /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

Then run sudo apt update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.