Debian apt-get update failing to reach internet sources “W: Failed to fetch”

The Scenario

I have a Debian Jessie 8.3 server on the company network that requires updates/patches installing for the first time. The server is configured to use online sources rather than the ISO/DVD.

The Problem

Every time I run “apt-get update” I get source connection errors “W: Failed to fetch…”

The Solution

My problem was the proxy – I had not yet defined the proxy settings the server should use.

  • vi /etc/apt/apt.conf – create this file if needed
  • Type the following (altering for your specific proxy settings of course):

debian_proxy

  • Save the file (:wq!) and retry the “apt-get update” command which now worked, i.e the response was similar to “Hit http://ftp.uk.debian.org jessie/main Sources..” and “Get:4 http://security.debian.org jessie/updates/main Sources [189 kB]”

Disclaimer: provided “AS IS” with no warranties and confer no rights

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s