I'm new to Ubuntu. I'm using Ubuntu 14.04.02 LTS inside of VMware. Since I'm behind a network firewall, I've edited the apt.conf file so apt-get will work behind a proxy server, and that's fine. But, when I do

sudo apt-get update

I get the following:

Ign http://security.ubuntu.com trusty-security InRelease
Ign http://us.archive.ubuntu.com trusty InRelease                              
Ign http://extras.ubuntu.com trusty InRelease                                  
Ign http://files.ettus.com trusty InRelease                                    
Ign http://security.ubuntu.com trusty-security Release.gpg                     
Ign http://us.archive.ubuntu.com trusty-updates InRelease                      
Ign http://archive.ubuntu.com trusty InRelease                                 
Ign http://extras.ubuntu.com trusty Release.gpg                                
Ign http://files.ettus.com trusty Release.gpg                                  
Ign http://us.archive.ubuntu.com trusty-backports InRelease                    
Ign http://security.ubuntu.com trusty-security Release                         
Ign http://us.archive.ubuntu.com trusty Release.gpg                            
Ign http://extras.ubuntu.com trusty Release                                    
Ign http://files.ettus.com trusty Release                                      
Ign http://us.archive.ubuntu.com trusty-updates Release.gpg                    
Ign http://us.archive.ubuntu.com trusty-backports Release.gpg                  
Ign http://archive.ubuntu.com trusty Release.gpg                               
Ign http://us.archive.ubuntu.com trusty Release                                
Ign http://us.archive.ubuntu.com trusty-updates Release                        
Ign http://archive.ubuntu.com trusty Release                                   
Ign http://us.archive.ubuntu.com trusty-backports Release                      
Err http://archive.ubuntu.com trusty/main Sources                              
  404  Not Found
Err http://archive.ubuntu.com trusty/restricted Sources                        
  404  Not Found
Err http://archive.ubuntu.com trusty/multiverse Sources                        
  404  Not Found
Err http://files.ettus.com trusty/main amd64 Packages                          
  404  Not Found
Err http://files.ettus.com trusty/main i386 Packages                           
  404  Not Found
Err http://extras.ubuntu.com trusty/main Sources                               
  404  Not Found
Ign http://files.ettus.com trusty/main Translation-en_US                       
Ign http://files.ettus.com trusty/main Translation-en                          
Err http://extras.ubuntu.com trusty/main amd64 Packages                        
  404  Not Found
Err http://extras.ubuntu.com trusty/main i386 Packages               
  404  Not Found

... lots more here...

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/universe/source/Sources  404  Not Found

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/main/source/Sources  404  Not Found

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/restricted/source/Sources  404  Not Found

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/multiverse/source/Sources  404  Not Found

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/restricted/binary-amd64/Packages  404  Not Found

...and lots more...

I poked around online and found that some of the paths are missing the file extension at the end. Is that part of the problem? Like I said, I'm totally new to Ubuntu and am still figuring things out. How can I fix this problem?

I did etc/apt/sources.list and get the following:

# deb cdrom:[Ubuntu 14.04.2 LTS _Trusty Tahr_ - Release amd64 (20150218.1)]/ trusty main restricted
deb-src http://archive.ubuntu.com/ubuntu trusty main restricted multiverse #Added by software-properties

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe main restricted #Added by software-properties

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe main restricted multiverse #Added by software-properties

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse #Added by software-properties

deb http://security.ubuntu.com/ubuntu trusty-security main restricted multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security universe main restricted multiverse #Added by software-properties
deb http://security.ubuntu.com/ubuntu trusty-security universe

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

I found this answer, but my sources.list file doesn't even contain the line that needed to be deleted, so that didn't help. I also looked here but that didn't solve my problem. I'm stumped on this one. Any suggestions? Is this a duplicate question that I didn't find? Thanks for your help.

Regards, Marshall

  • 1
    How did you determine that your proxy configuration in apt.conf is "fine"? – steeldriver Jun 2 '15 at 18:13
  • please perform a ping test. eg: ping askubuntu.com. Check the result. – Marcos Silveira Jun 2 '15 at 18:14
  • I performed the ping test (ping askubuntu.com) and got the following: 64 bytes from 104.16.16.44: icmp_seq=1 ttl=128 time=36.1 ms 64 bytes from 104.16.16.44: icmp_seq=2 ttl=128 time=36.1 ms 64 bytes from 104.16.16.44: icmp_seq=3 ttl=128 time=36.0 ms 64 bytes from 104.16.16.44: icmp_seq=4 ttl=128 time=35.3 ms 64 bytes from 104.16.16.44: icmp_seq=5 ttl=128 time=32.5 ms 64 bytes from 104.16.16.44: icmp_seq=6 ttl=128 time=32.6 ms 64 bytes from 104.16.16.44: icmp_seq=7 ttl=128 time=32.5 ms 64 bytes from 104.16.16.44: icmp_seq=8 ttl=128 time=32.6 ms and so on. – Marshall Garey Jun 4 '15 at 16:40
  • I also tried the answer here: askubuntu.com/questions/41605/… but it didn't work. – Marshall Garey Jun 4 '15 at 16:45
  • Sorry, I forgot to put the stats report in the command line: 51 packets transmitted, 48 received, 5% packet loss, time 50105ms rtt min/avg/max/mdev = 32.502/34.173/36.934/1.660 ms – Marshall Garey Jun 4 '15 at 16:48
up vote 0 down vote accepted

Well, with the help of a colleague I got it working. There were two main things we did:

(1) We set the proxy settings in the environment file, rather than apt.conf (so the proxy settings would be set for every application). Also, we did find my proxy settings were set wrong (thanks steeldriver for asking me to double check that).

http_proxy=<correct proxy setting>
https_proxy=<correct proxy setting>
no_proxy=<internal work website url>

The no_proxy setting is for my work's own internal website, since we don't use a proxy to access it, so without no_proxy environment variable, I wouldn't be able to access that website.

(2) I had gone into /etc/sudoers file and added Defaults for each environment variable after Defaults env_reset (so there were 3 lines that I had added). It turns out that this was broken; instead, we just added the 3 environment variables on the same line as Defaults env_reset with env_keep, like so:

Defaults env_reset, env_keep+=no_proxy, env_keep+=http_proxy, env_keep+=https_proxy

With this, these environment variables don't disappear each time I would use sudo. Now I'm up and running just fine.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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