4

My sources.list:

deb http://http.debian.net/debian wheezy main contrib non-free 
deb-src http://http.debian.net/debian wheezy main contrib non-free
deb http://http.debian.net/debian wheezy-updates main contrib non-free 
deb-src http://http.debian.net/debian wheezy-updates main contrib non-free 
deb http://security.debian.org/ wheezy/updates main contrib non-free 
deb-src http://security.debian.org/ wheezy/updates main contrib non-free 

Whenever I try to execute the following command,

apt update OR apt-get update

It is stuck at:

0% [Connecting to http.debian.net (2001:67c:2564:a119::148:14)]

Could someone help me?

  • it didn't worked, i am also not able to install any apt packags. – Ansari Abdullah Mar 28 '18 at 8:03
  • As the output you show clearly shows problems with IPv6 connectivity, you should have a new situation after disabling IPv6, please tell us! – Henrik Mar 28 '18 at 8:11
2

http://http.debian.net/debian does not seem to contain a Debian package repository, so your sources.list settings need updating.

Also, your sources.list mentions wheezy. That's the release name for Debian 7, not Debian 9. What is the output of cat /etc/debian_version for you?

If it reports a number starting with 7, you're running Debian 7 ("Wheezy"), not Debian 9. In that case, you should think very carefully about upgrading: the Long Term Support for Debian 7 ends at 2018-05-31, that is in two months.

You'll find the correct settings for your sources.list file for Debian 7 LTS from here:

https://wiki.debian.org/LTS/Using

deb http://deb.debian.org/debian/ wheezy main contrib non-free
deb-src http://deb.debian.org/debian/ wheezy main contrib non-free

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

deb http://deb.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://deb.debian.org/debian/ wheezy-updates main contrib non-free

If cat /etc/debian_version reports a number starting with 9, you should use the sources.list settings shown in Kiwy's answer.

1

You mention Debian 9, your file /etc/apt/sources.list should look like this:

deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free
deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security/ stretch/updates main contrib non-free

Wheezy LTS will be supported until 31th of May 2018.

1

Please Disable ipv6 in sysctl add strin in /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

sysctl -p or reboot

New contributor
EvgenyShatalov is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

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.