0

I get the following output when running sudo apt-get update:

Ign https://repo.varnish-cache.org trusty Release   
Ign https://repo.varnish-cache.org trusty/varnish-4.0 amd64 Packages/DiffIndex
Ign https://repo.varnish-cache.org trusty/varnish-4.0 i386 Packages/DiffIndex
Ign https://repo.varnish-cache.org trusty/varnish-4.0 Translation-en_US        
Ign https://repo.varnish-cache.org trusty/varnish-4.0 Translation-en           
Err https://repo.varnish-cache.org trusty/varnish-4.0 amd64 Packages           
  gnutls_handshake() failed: Handshake failed
Err https://repo.varnish-cache.org trusty/varnish-4.0 i386 Packages            
  gnutls_handshake() failed: Handshake failed
Fetched 5,403 kB in 10s (506 kB/s)                                             
W: Failed to fetch https://repo.varnish-cache.org/ubuntu/dists/trusty/varnish-4.0/binary-amd64/Packages  gnutls_handshake() failed: Handshake failed

W: Failed to fetch https://repo.varnish-cache.org/ubuntu/dists/trusty/varnish-4.0/binary-i386/Packages  gnutls_handshake() failed: Handshake failed

E: Some index files failed to download. They have been ignored, or old ones used instead.

What does it mean and how do I fix this?

2
  • try ping google.com from terminal to confirm that your network is ok! Sep 5, 2017 at 15:46
  • Network is fine. Everything else updates ok. Sep 5, 2017 at 16:13

3 Answers 3

5

To fix, remove old Varnish-Cache and broken APT repo source:

sudo apt-get purge varnish

sudo rm /etc/apt/sources.list.d/varnish*

sudo apt-key list | grep "varnish"

^ (find the GPG 'KeyID' on the left that matches varnish-cache)

sudo apt-key del (Varnish-Cache GPG KeyID from above)

Run apt update - you should see no more errors:

sudo apt-get update


If you wish to install it again via official Ubuntu repo:

sudo apt-get install varnish

See: https://varnish-cache.org/releases/install_debian.html


If you wish to install newest or dev version, follow this (or newer guide):

=> https://packagecloud.io/varnishcache/varnish5/install#bash-deb

4

That is an ssl error.

If you go to the home page you get:

repo.varnish-cache.org is no more.

The project homepage has full details about where to obtain releases, packages etc.

If you then go to the home page : http://varnish-cache.org/releases/

You will see

Deb and RPM repositories now at Packagecloud

The official packages for Debian, Ubuntu, CentOS and Red Hat are now located in repositories at Packagecloud.io. Users of repo.varnish-cache.org repositories will have to change their hosts over to the new repository configuration. For details see the below sections for the distribution in question.

And going through the page evventually leads to

https://packagecloud.io/varnishcache/varnish5/install

So , bottom line, you have an ssl error as the repo no longer exists and you need to update your repos ;)

3
  • I have got deb repo.varnish-cache.org/ubuntu trusty varnish-4.0 in my list file. Can I just replace it with something else or do I need to uninstall varnish & then re-install? Sep 15, 2017 at 12:52
  • 1
    No as you can see that is the wrong repo. See packagecloud.io/varnishcache/varnish5/install#manual and the link I gave you for details.
    – Panther
    Sep 15, 2017 at 17:39
  • Thanks for your help. I ran the varnish 4 install script. I didn't realise I would need to run this. I also manually deleted the old .list file. Sep 19, 2017 at 10:27
1

I ran into a similar issue on Ubuntu 14.04. I had this...

curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
printf "Package: *\nPin: origin apt.syncthing.net\nPin-Priority: 990\n" | sudo tee /etc/apt/preferences.d/syncthing
sudo apt-get update
sudo apt-get install -y syncthing

... which gave me this error...

W: Failed to fetch https://apt.syncthing.net/dists/syncthing/stable/binary-amd64/Packages  gnutls_handshake() failed: Handshake failed

The only thing I needed to do was change the https://apt.syncthing.net/ to http://apt.syncthing.net/ so it used http instead of https. This is less secure but it's a quick fix for installing packages when you're using old systems like Ubuntu 14.04 that don't have all the latest https ciphers that certain newer APT repos expect clients to use.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .