6

I'm trying to update my linux packages but I get the following error:

# apt-get update
Ign:1 http://ftp.be.debian.org/debian wheezy InRelease
Hit:2 http://ftp.be.debian.org/debian wheezy Release
Hit:4 http://ftp2.nluug.nl/os/Linux/distr/kali kali-rolling InRelease
Reading package lists... Done
# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  cadaver cups-bsd cups-client curl empathy exim4-daemon-light gir1.2-networkmanager-1.0
  gir1.2-totem-1.0 glib-networking iptables ldap-utils libavformat-ffmpeg56 libct4 libcups2
  libcupsimage2 libcurl3-gnutls libgadu3 libgnomevfs2-0 libgnustep-base1.24 libgnutls-openssl27
  libimobiledevice6 libldap-2.4-2 libmagickcore-6.q16-2-extra libneon27-gnutls libnm-gtk-common
  libnm-gtk0 libnm-util2 libnm0 libopencv-calib3d2.4v5 libopencv-contrib2.4v5 libopencv-core2.4v5
  libopencv-features2d2.4v5 libopencv-flann2.4v5 libopencv-highgui2.4v5 libopencv-imgproc2.4v5
  libopencv-legacy2.4v5 libopencv-ml2.4v5 libopencv-objdetect2.4v5 libopencv-video2.4v5
  libpython3-stdlib librtmp1 libsybdb5 libvncclient1 libvte-2.91-0 libvte-2.91-common
  libwireshark6 libzmq3 netsniff-ng network-manager network-manager-gnome ntfs-3g pack
  python-netlib python-pycurl python3 python3-minimal telepathy-gabble telepathy-salut totem
  totem-plugins tshark vino vlc vlc-nox vpnc wget wireshark-common wireshark-qt
  xserver-xorg-video-all
The following packages will be upgraded:
  gir1.2-packagekitglib-1.0 gnuplot5-data gnuplot5-qt libpackagekit-glib2-18 nano packagekit
  packagekit-tools set xserver-common xserver-xephyr xserver-xorg-core xserver-xorg-input-evdev
  xserver-xorg-input-mouse xserver-xorg-input-synaptics xserver-xorg-input-vmmouse
  xserver-xorg-input-wacom xserver-xorg-legacy xserver-xorg-video-ati xserver-xorg-video-fbdev
  xserver-xorg-video-intel xserver-xorg-video-nouveau xserver-xorg-video-qxl
  xserver-xorg-video-radeon xserver-xorg-video-vesa xserver-xorg-video-vmware xwayland
26 upgraded, 0 newly installed, 0 to remove and 69 not upgraded.
Need to get 55.1 MB/58.6 MB of archives.
After this operation, 108 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Err:1 http://http.kali.org/kali kali-rolling/main amd64 nano amd64 2.5.1-1
  404  Not Found
Err:2 http://http.kali.org/kali kali-rolling/main amd64 libpackagekit-glib2-18 amd64 1.0.11-2
  404  Not Found
Err:3 http://http.kali.org/kali kali-rolling/main amd64 gir1.2-packagekitglib-1.0 amd64 1.0.11-2
  404  Not Found
Err:4 http://http.kali.org/kali kali-rolling/main amd64 gnuplot5-qt amd64 5.0.2+dfsg1-2
  404  Not Found
Err:5 http://http.kali.org/kali kali-rolling/main amd64 gnuplot5-data all 5.0.2+dfsg1-2
  404  Not Found
Err:6 http://http.kali.org/kali kali-rolling/main amd64 packagekit-tools amd64 1.0.11-2
  404  Not Found
Err:7 http://http.kali.org/kali kali-rolling/main amd64 packagekit amd64 1.0.11-2
  404  Not Found
Err:8 http://http.kali.org/kali kali-rolling/main amd64 xserver-common all 2:1.18.0-3
  404  Not Found
Err:9 http://http.kali.org/kali kali-rolling/main amd64 xserver-xephyr amd64 2:1.18.0-3
  404  Not Found
Err:10 http://http.kali.org/kali kali-rolling/main amd64 xserver-xorg-legacy amd64 2:1.18.0-3
  404  Not Found
Err:11 http://http.kali.org/kali kali-rolling/main amd64 xserver-xorg-core amd64 2:1.18.0-3
  404  Not Found
Err:12 http://http.kali.org/kali kali-rolling/main amd64 xwayland amd64 2:1.18.0-3
  404  Not Found
Err:13 http://http.kali.org/kali kali-rolling/main amd64 set all 7.0.3.3-0kali1
  404  Not Found
E: Failed to fetch http://http.kali.org/kali/pool/main/n/nano/nano_2.5.1-1_amd64.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/p/packagekit/libpackagekit-glib2-18_1.0.11-2_amd64.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/p/packagekit/gir1.2-packagekitglib-1.0_1.0.11-2_amd64.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnuplot5/gnuplot5-qt_5.0.2+dfsg1-2_amd64.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnuplot5/gnuplot5-data_5.0.2+dfsg1-2_all.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/p/packagekit/packagekit-tools_1.0.11-2_amd64.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/p/packagekit/packagekit_1.0.11-2_amd64.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/x/xorg-server/xserver-common_1.18.0-3_all.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/x/xorg-server/xserver-xephyr_1.18.0-3_amd64.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/x/xorg-server/xserver-xorg-legacy_1.18.0-3_amd64.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/x/xorg-server/xserver-xorg-core_1.18.0-3_amd64.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/x/xorg-server/xwayland_1.18.0-3_amd64.deb  404  Not Found

E: Failed to fetch http://http.kali.org/kali/pool/main/s/set/set_7.0.3.3-0kali1_all.deb  404  Not Found

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I tried the following commands in this order but it didn't help.

  • sudo apt-get clean
  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get update --fix-broken
  • sudo apt-get dist-upgrade

sources.list:

# 

# deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 2$

# deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 2$

deb http://http.kali.org/kali kali-rolling main non-free contrib

deb-src http://http.kali.org/kali kali-rolling main non-free contrib

deb http://ftp.be.debian.org/debian/ wheezy main

Also my key list is up to date (as far as I can see).

# apt-key list
/etc/apt/trusted.gpg
--------------------
pub   4096R/1804772E 2014-11-24
uid                  Emdebian Toolchain Archive (signing key)

/etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg
----------------------------------------------------------
pub   4096R/2B90D010 2014-11-21 [expires: 2022-11-19]
uid                  Debian Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>

/etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg
-------------------------------------------------------------------
pub   4096R/C857C906 2014-11-21 [expires: 2022-11-19]
uid                  Debian Security Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>

/etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg
-------------------------------------------------------
pub   4096R/518E17E1 2013-08-17 [expires: 2021-08-15]
uid                  Jessie Stable Release Key <debian-release@lists.debian.org>

/etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg
-----------------------------------------------------------
pub   4096R/473041FA 2010-08-27 [expires: 2018-03-05]
uid                  Debian Archive Automatic Signing Key (6.0/squeeze) <ftpmaster@debian.org>

/etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg
--------------------------------------------------------
pub   4096R/B98321F9 2010-08-07 [expires: 2017-08-05]
uid                  Squeeze Stable Release Key <debian-release@lists.debian.org>

/etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg
----------------------------------------------------------
pub   4096R/46925553 2012-04-27 [expires: 2020-04-25]
uid                  Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>

/etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg
-------------------------------------------------------
pub   4096R/65FFB764 2012-05-08 [expires: 2019-05-07]
uid                  Wheezy Stable Release Key <debian-release@lists.debian.org>

/etc/apt/trusted.gpg.d/kali-archive-keyring.gpg
-----------------------------------------------
pub   4096R/7D8D0BF6 2012-03-05 [expires: 2018-02-02]
uid                  Kali Linux Repository <devel@kali.org>
sub   4096R/FC0D0DCB 2012-03-05 [expires: 2018-02-02]

Everything was working fine but today randomly when trying to upgrade packages it gives that error. I can still install other software though. Does anyone knows how I can fix this?

2
  • apt couldn't able to connect to repository. Check if internet is ok
    – jijinp
    Feb 18, 2016 at 14:46
  • @7171u My internet works. I can connect manually to the repository without any problems.
    – Android
    Feb 18, 2016 at 14:58

9 Answers 9

7

I used

deb http://repo.kali.org/kali kali-rolling main non-free contrib

deb-src http://repo.kali.org/kali kali-rolling main non-free contrib

for sources instead of the original ones. It worked like a charm.

4
  • Can you point to an official source suggesting these? It looks from the URLs like they are probably safe to use, but given the level of compromise that can happen when using an inappropriate repository (basically, an attacker can take over the whole system), some sort of official statement -- even if it's just a page on the distro's official web site giving them as an alternative -- is always good.
    – user
    Feb 18, 2016 at 20:30
  • @MichaelKjörling That would indeed be nice since I've heard something like that is going around lately. dimitrios1988 Could you provide an official source suggesting these?
    – Android
    Feb 19, 2016 at 11:23
  • I don't have an official source. I found it on another forum. Feb 20, 2016 at 7:30
  • @MichaelKjörling, btw it is Kali's subdomain. Don't worry. There is no attacker. And the packages are signed by Kali. Feb 20, 2016 at 7:33
2

According to the Kali Linux Official Documentation, the sources.list file should contain the following line(s):

deb http://http.kali.org/kali kali-rolling main contrib non-free
# For source package access, uncomment the following line
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free

(changing/updating my sources.list file accordingly, fixed this issue for me)

1

Nevermind my VPS hosting e-mailed me saying there were some problems with my VPS and that they where working on fixing it. And I just tried it and it worked again...

Very strange since I could reach the kali repository manually just fine...

1

You could try to change your repository protocol from http to https at /etc/apt/sources.list ; this worked for me.

enter image description here

Then you can update or upgrade without problems

$ sudo apt update && apt upgrade

source solution: https://linuxconfig.org/kali-linux-failed-to-fetch-inrelease-repository-fix

1
  • 1
    This works, and will work for most of the people having this issue as of May 2021, this should be marked as a reply.
    – nethero
    May 28, 2021 at 12:02
0

worked for me step 1. wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add

step 2. apt install ./kali-archive-keyring_2018.1_all.deb

step 3 apt-get update

0

If nothing of the above works, it is probably the network adapter problem. I use VBox and changing the adapter from NAT to Bridged Adapter solved this!

0

I had the same issue and made a video explaining how to solve it along with any missing Linux headers. https://youtu.be/8A-scMfJDT8

You basically need to add the berkley mirror for kali https://mirrors.ocf.berkeley.edu/kali/

You can see how to add it to the sources list in my video above.

1
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jul 15 at 13:07
-2

I'm a beginner, don't know much in depth about the issue. I, though, wasted my two whole days searching on internet about same problem: "kali rolling repository is not updating." Nothing worked. Then I switched from my public hostel Wi-Fi to paid mobile internet hotspot, re-tried the following command:

apt-get update

and it worked perfectetly. If U are using some school or public Wi-Fi, it maybe restricting or blocking your hits. Try SWITCHING your internet connections or use VPN. Worked for me.

3
  • 1
    What exactly is your suggestion? The author already attempted apt-get update which is the entire reason this question exists. The author submitted an answer themselves indicating it was a problem with their VPS service itself.
    – Ramhound
    Nov 29, 2017 at 15:32
  • I am a beginner myself. Don't know in depth. apt-get update was not working for me on 'public Wi-Fi'. When I switched to my own internet connection , it worked. I was suggesting to switch internet connections or try a VPN! Nov 29, 2017 at 21:17
  • The author is using a VPS, difficult to use a "different internet connection" in that case. The suggestion of a VPN has some merits but seems overkill.
    – Ramhound
    Nov 29, 2017 at 21:37
-2

deb http://kali.mirror.garr.it/mirrors/kali kali-rolling main non-free contrib

deb-src http://kali.mirror.garr.it/mirrors/kali kali-rolling main non-free contrib

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.