5

I am new to Ubuntu. I am facing some problem running the sudo apt-get update command. It shows the below mentioned error.

My system configuration:

  • Ubuntu 12.04 LTS
  • 32 bit

Command:

sudo apt-get update

Error log:

   Err http://security.ubuntu.com precise-security Release.gpg
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise Release.gpg                                      
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates Release.gpg                              
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security Release                                 
Err http://in.archive.ubuntu.com precise-backports Release.gpg                             
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Ign http://in.archive.ubuntu.com precise Release                                           
Ign http://in.archive.ubuntu.com precise-updates Release                                 
Ign http://in.archive.ubuntu.com precise-backports Release                               
Ign http://security.ubuntu.com precise-security/main TranslationIndex                    
Ign http://security.ubuntu.com precise-security/multiverse TranslationIndex                
Ign http://security.ubuntu.com precise-security/restricted TranslationIndex                
Ign http://security.ubuntu.com precise-security/universe TranslationIndex                  
Ign http://in.archive.ubuntu.com precise/main TranslationIndex                             
Ign http://in.archive.ubuntu.com precise/multiverse TranslationIndex                       
Ign http://in.archive.ubuntu.com precise/restricted TranslationIndex                     
Ign http://in.archive.ubuntu.com precise/universe TranslationIndex                       
Ign http://in.archive.ubuntu.com precise-updates/main TranslationIndex                   
Ign http://in.archive.ubuntu.com precise-updates/multiverse TranslationIndex             
Ign http://in.archive.ubuntu.com precise-updates/restricted TranslationIndex                                                   
Ign http://in.archive.ubuntu.com precise-updates/universe TranslationIndex                                                     
Ign http://in.archive.ubuntu.com precise-backports/main TranslationIndex                 
Ign http://in.archive.ubuntu.com precise-backports/multiverse TranslationIndex                                                 
Ign http://in.archive.ubuntu.com precise-backports/restricted TranslationIndex                                                 
Ign http://in.archive.ubuntu.com precise-backports/universe TranslationIndex                                                   
Err http://security.ubuntu.com precise-security/main Sources                                                                   
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/restricted Sources                                                             
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/universe Sources                           
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/multiverse Sources                         
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/main i386 Packages                         
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/restricted i386 Packages                   
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/universe i386 Packages                     
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/multiverse i386 Packages                   
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/main Translation-en_IN                     
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/main Translation-en                        
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/multiverse Translation-en_IN               
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/multiverse Translation-en                                                      
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/restricted Translation-en_IN                                                   
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/restricted Translation-en                                                      
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/universe Translation-en_IN                                                     
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://security.ubuntu.com precise-security/universe Translation-en                                                        
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/main Sources                                                                          
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/restricted Sources                                
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/universe Sources
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/multiverse Sources                                
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/main i386 Packages                                
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/restricted i386 Packages                          
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/universe i386 Packages                            
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/multiverse i386 Packages
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/main Sources
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/restricted Sources
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/universe Sources
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/multiverse Sources
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/main i386 Packages
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/restricted i386 Packages
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/universe i386 Packages
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/multiverse i386 Packages
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/main Sources
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/restricted Sources
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/universe Sources
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/multiverse Sources
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/main i386 Packages
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/restricted i386 Packages
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/universe i386 Packages
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/multiverse i386 Packages
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/main Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/main Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/multiverse Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/multiverse Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/restricted Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/restricted Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/universe Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise/universe Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/main Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/main Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/multiverse Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/multiverse Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/restricted Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/restricted Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/universe Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-updates/universe Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/main Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/main Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/multiverse Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/multiverse Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/restricted Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/restricted Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/universe Translation-en_IN
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err http://in.archive.ubuntu.com precise-backports/universe Translation-en
  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Hit http://extras.ubuntu.com precise Release.gpg
Hit http://extras.ubuntu.com precise Release
Hit http://extras.ubuntu.com precise/main Sources
Hit http://extras.ubuntu.com precise/main i386 Packages
Ign http://extras.ubuntu.com precise/main TranslationIndex
Ign http://extras.ubuntu.com precise/main Translation-en_IN
Ign http://extras.ubuntu.com precise/main Translation-en
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/source/Sources  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/restricted/source/Sources  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/universe/source/Sources  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/multiverse/source/Sources  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/binary-i386/Packages  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/restricted/binary-i386/Packages  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/universe/binary-i386/Packages  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/multiverse/binary-i386/Packages  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/main/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/main/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/main/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/main/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/i18n/Translation-en_IN  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/i18n/Translation-en  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/multiverse/i18n/Translation-en_IN  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/multiverse/i18n/Translation-en  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/restricted/i18n/Translation-en_IN  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/restricted/i18n/Translation-en  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/universe/i18n/Translation-en_IN  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/i18n/Translation-en_IN  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/i18n/Translation-en  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/i18n/Translation-en_IN  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/i18n/Translation-en  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/i18n/Translation-en_IN  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/i18n/Translation-en  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

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

My new "/etc/host" file:

127.0.0.1       localhost  
127.0.1.1       user1-ThinkCentre-M71e  
91.189.92.152   extras.ubuntu.com  
91.189.92.201   in.archive.ubuntu.com  
91.189.91.24    security.ubuntu.com  

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
  • 1
    The problem seems to be different on this question that the one suggested as duplicate by @SOORAJS. Just for consideration before closing it is desirable to provide a better previous answer or a new one to keep this question active. Thank you. – Geppettvs D'Constanzo Mar 16 '15 at 07:13
  • Maybe a DNS error? – 0x2b3bfa0 Mar 16 '15 at 08:57
  • 3
  • 1
    @Helio, if it is a DNS error, can you please provide me the steps to resolve this? or provide me any link which explains to solve this? Thanks. – kumarhimanshu449 Mar 17 '15 at 07:57
  • 1
    @DavidFoerster, My problem is some what similar to that problem, but that suggestion did,t help me and since I don't have 50 score so I can't put comments in that post too. Hoping for your help. – kumarhimanshu449 Mar 17 '15 at 08:00
  • 2
    Ok. Does host extras.ubuntu.com resolve to an IP address? If not, try host extras.ubuntu.com 8.8.8.8. – David Foerster Mar 17 '15 at 11:19
  • Did you solved it? – 0x2b3bfa0 Mar 17 '15 at 12:32
  • Thanks @DavidFoerster and Helio for your valuable help. I was facing "No address associated with hostname" error with three hosts (extras.ubuntu.com, in.archive.ubuntu.com and security.ubuntu.com). I first find out the IP address as suggested by David (host extras.ubuntu.com 8.8.8.8), than I updated my "/etc/host" file as suggested by Helio (sudo nano /etc/host). Now command “sudo apt-get update” is working very fine without any error. Thanks once more to both of you :) – kumarhimanshu449 Mar 17 '15 at 12:58
  • Can you update the post with your new /etc/hosts file? – 0x2b3bfa0 Mar 17 '15 at 13:06
  • Please upvote the @DavidFoerster comment. – 0x2b3bfa0 Mar 17 '15 at 13:09
  • Hello guyz, Today I again I am facing some issues while running the update command "sudo apt-get update". It shows this error "_Err http://security.ubuntu.com precise-security Release.gpg
    Could not connect to security.ubuntu.com:80 (91.189.91.24), connection timed out Err http://in.archive.ubuntu.com precise Release.gpg
    Could not connect to in.archive.ubuntu.com:80 (91.189.92.201), connection timed out Err http://extras.ubuntu.com precise Release.gpg
    Could not connect to extras.ubuntu.com:80 (91.189.92.152), connection timed out _" . Plz help me out. Thanks
    – kumarhimanshu449 Mar 18 '15 at 12:23
  • @Helio, Actually I am trying to install a software in ubuntu name Ambari [http://docs.hortonworks.com/HDPDocuments/Ambari-1.7.0.0/AMBARI_DOC_SUITE/index.html#Item2.5.3]. During the process of installing this software I created public and private SSH keys using command 'ssh-keygen'. Is it possible due to this I am again facing problem in update command? – kumarhimanshu449 Mar 18 '15 at 12:30
  • @DavidFoerster, Now when I am using 'host extras.ubuntu.com 8.8.8.8' to get the ipaddress it is showing ';; connection timed out; no servers could be reached'. – kumarhimanshu449 Mar 18 '15 at 12:32
  • Looks like you can't reach Google's DNS server. Does your internet connection work otherwise? As a last resort try ping 8.8.8.8. – David Foerster Mar 18 '15 at 12:47
  • I tried 'ping 8.8.8.8', it's not pinging. it shows --- 8.8.8.8 ping statistics --- 882 packets transmitted, 0 received, 100% packet loss, time 888046ms – kumarhimanshu449 Mar 18 '15 at 13:41

1 Answers1

3

It may be a well-known bug in apt-get that does not use the system's DNS to resolve domains. To fix this you may need to add the following line to /etc/hosts (you can edit this file with sudo nano /etc/hosts or sudo gedit /etc/hosts):

 extras.ubuntu.com       91.189.92.152
0x2b3bfa0
  • 8,780
  • 6
  • 36
  • 55
  • Thanks @Helio for your valuable help, it solved my problem. I was facing "No address associated with hostname" error with three hosts (extras.ubuntu.com, in.archive.ubuntu.com and security.ubuntu.com). I first find out the IP address using command "host extras.ubuntu.com 8.8.8.8", than I updated my "/etc/host" file using "sudo nano /etc/host". This is what I updated in "/etc/host" file:
    91.189.92.152 extras.ubuntu.com
    91.189.92.201 in.archive.ubuntu.com
    91.189.91.24 security.ubuntu.com
    – kumarhimanshu449 Mar 17 '15 at 13:05