apt-get update fails to fetch files, “Temporary failure resolving …” error












77















Err http://archive.canonical.com natty InRelease    
Err http://security.ubuntu.com oneiric-security InRelease
Err http://extras.ubuntu.com natty InRelease
Err http://security.ubuntu.com oneiric-security Release.gpg
Temporary failure resolving ‘security.ubuntu.com’
Err http://archive.canonical.com natty Release.gpg
Temporary failure resolving ‘archive.canonical.com’
Err http://extras.ubuntu.com natty Release.gpg
Temporary failure resolving ‘extras.ubuntu.com’
Err http://gb.archive.ubuntu.com oneiric InRelease
Err http://gb.archive.ubuntu.com oneiric-updates InRelease
Err http://gb.archive.ubuntu.com natty-backports InRelease
Err http://gb.archive.ubuntu.com oneiric Release.gpg
Temporary failure resolving ‘gb.archive.ubuntu.com’
Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg
Temporary failure resolving ‘gb.archive.ubuntu.com’
Err http://gb.archive.ubuntu.com natty-backports Release.gpg
Temporary failure resolving ‘gb.archive.ubuntu.com’

Reading package lists... Done
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving ‘archive.canonical.com’
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg Temporary failure resolving ‘security.ubuntu.com’
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving ‘extras.ubuntu.com’
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
W: Some index files failed to download. They have been ignored, or old ones used instead.


This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.










share|improve this question





























    77















    Err http://archive.canonical.com natty InRelease    
    Err http://security.ubuntu.com oneiric-security InRelease
    Err http://extras.ubuntu.com natty InRelease
    Err http://security.ubuntu.com oneiric-security Release.gpg
    Temporary failure resolving ‘security.ubuntu.com’
    Err http://archive.canonical.com natty Release.gpg
    Temporary failure resolving ‘archive.canonical.com’
    Err http://extras.ubuntu.com natty Release.gpg
    Temporary failure resolving ‘extras.ubuntu.com’
    Err http://gb.archive.ubuntu.com oneiric InRelease
    Err http://gb.archive.ubuntu.com oneiric-updates InRelease
    Err http://gb.archive.ubuntu.com natty-backports InRelease
    Err http://gb.archive.ubuntu.com oneiric Release.gpg
    Temporary failure resolving ‘gb.archive.ubuntu.com’
    Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg
    Temporary failure resolving ‘gb.archive.ubuntu.com’
    Err http://gb.archive.ubuntu.com natty-backports Release.gpg
    Temporary failure resolving ‘gb.archive.ubuntu.com’

    Reading package lists... Done
    W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease
    W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease
    W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease
    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease
    W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease
    W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease
    W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving ‘archive.canonical.com’
    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg Temporary failure resolving ‘security.ubuntu.com’
    W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving ‘extras.ubuntu.com’
    W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
    W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
    W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
    W: Some index files failed to download. They have been ignored, or old ones used instead.


    This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.










    share|improve this question



























      77












      77








      77


      33






      Err http://archive.canonical.com natty InRelease    
      Err http://security.ubuntu.com oneiric-security InRelease
      Err http://extras.ubuntu.com natty InRelease
      Err http://security.ubuntu.com oneiric-security Release.gpg
      Temporary failure resolving ‘security.ubuntu.com’
      Err http://archive.canonical.com natty Release.gpg
      Temporary failure resolving ‘archive.canonical.com’
      Err http://extras.ubuntu.com natty Release.gpg
      Temporary failure resolving ‘extras.ubuntu.com’
      Err http://gb.archive.ubuntu.com oneiric InRelease
      Err http://gb.archive.ubuntu.com oneiric-updates InRelease
      Err http://gb.archive.ubuntu.com natty-backports InRelease
      Err http://gb.archive.ubuntu.com oneiric Release.gpg
      Temporary failure resolving ‘gb.archive.ubuntu.com’
      Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg
      Temporary failure resolving ‘gb.archive.ubuntu.com’
      Err http://gb.archive.ubuntu.com natty-backports Release.gpg
      Temporary failure resolving ‘gb.archive.ubuntu.com’

      Reading package lists... Done
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease
      W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease
      W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease
      W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease
      W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving ‘archive.canonical.com’
      W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg Temporary failure resolving ‘security.ubuntu.com’
      W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving ‘extras.ubuntu.com’
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
      W: Some index files failed to download. They have been ignored, or old ones used instead.


      This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.










      share|improve this question
















      Err http://archive.canonical.com natty InRelease    
      Err http://security.ubuntu.com oneiric-security InRelease
      Err http://extras.ubuntu.com natty InRelease
      Err http://security.ubuntu.com oneiric-security Release.gpg
      Temporary failure resolving ‘security.ubuntu.com’
      Err http://archive.canonical.com natty Release.gpg
      Temporary failure resolving ‘archive.canonical.com’
      Err http://extras.ubuntu.com natty Release.gpg
      Temporary failure resolving ‘extras.ubuntu.com’
      Err http://gb.archive.ubuntu.com oneiric InRelease
      Err http://gb.archive.ubuntu.com oneiric-updates InRelease
      Err http://gb.archive.ubuntu.com natty-backports InRelease
      Err http://gb.archive.ubuntu.com oneiric Release.gpg
      Temporary failure resolving ‘gb.archive.ubuntu.com’
      Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg
      Temporary failure resolving ‘gb.archive.ubuntu.com’
      Err http://gb.archive.ubuntu.com natty-backports Release.gpg
      Temporary failure resolving ‘gb.archive.ubuntu.com’

      Reading package lists... Done
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease
      W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease
      W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease
      W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease
      W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving ‘archive.canonical.com’
      W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg Temporary failure resolving ‘security.ubuntu.com’
      W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving ‘extras.ubuntu.com’
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
      W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’
      W: Some index files failed to download. They have been ignored, or old ones used instead.


      This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.







      apt






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 22 '13 at 12:55









      Kevin Bowen

      14.4k155970




      14.4k155970










      asked Dec 30 '11 at 15:01









      LewisLewis

      503155




      503155






















          11 Answers
          11






          active

          oldest

          votes


















          117














          overview



          There are two parts to your question:




          • fixing temporary resolve messages

          • fixing the package management issues


          Temporary resolve



          It is likely that this issue is either:




          • temporary due to your Internet Service Provider not correctly forwarding internet naming (DNS) to either its or external DNS servers, or

          • due to a change in your network has similarly blocked this naming - for example, new router/modem, reconfiguring a switch with a new configuration.


          Lets look at the possible DNS resolving issues.



          First, temporarily add a known DNS server to your system.



          echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null


          Then run sudo apt-get update.



          If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you (or just contact your ISP) - or you can permanently add a DNS server to your system:



          echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null


          8.8.8.8 is Google's own DNS server.



          source



          Another example DNS server you could use is OpenDNS - for example:



          echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null


          package-management issues



          In addition to the temporary resolve issues - you have a few package management issues that need to be corrected - I'm assuming you have tried recently to upgrade from one Ubuntu version to the next recommended version - in your case from Natty (11.04) to Oneiric (11.10)



          Open a terminal and type



          sudo nano /etc/apt/sources.list


          Look for lines that have your a different distribution name in the list than you were expecting - in your case - you have upgraded to oneiric but you have another release name natty



          For example, look for lines that look like deb http:/archive.canonical.com/ natty backports



          Add a # to the beginning of the line to comment it out - for example



          #deb http:/archive.canonical.com/ natty backports



          Save and re-run:



          sudo apt-get update && sudo apt-get upgrade


          You should not have any more release naming errors.



          At the time of writing this, possible common release names include lucid, maverick, natty, oneiric, precise, quantal, raring, saucy, trusty, utopic and vivid.






          share|improve this answer


























          • Perfectly works :)

            – Maduka Jayalath
            Nov 11 '12 at 13:22











          • When one name pops out during the update, you might skip the DNS fiddling and go directly to the sources list.

            – SPRBRN
            Apr 24 '14 at 15:11











          • Still works perfectly with 15.04 and 15.10

            – lxx
            Jan 7 '16 at 7:51











          • Very thorough answer. Thank you.

            – jamescampbell
            Aug 2 '16 at 13:39






          • 1





            What if this doesn't work?

            – Matt G
            Jan 12 '17 at 0:46



















          9














          Note that this answer was written for old versions of Ubuntu. Current versions use a local nameserver controlled by D-Bus, for which the diagnosis part of this answer applies, but not the solution. If /etc/resolv.conf contains nameserver 127.0.1.1 or more generally nameserver 127.X.Y.Z, don't modify it.



          “Temporary failure resolving …” means that your DNS, i.e. the translation from host names to IP addresses, is not working. Did you reconfigure something on your machine recently? If not, this may be a transient error at your ISP.



          Does ping -n 8.8.8.8 show lines like 64 bytes from 8.8.8.8: …? (Press Ctrl+C to stop ping.)




          • If it doesn't, you specifically have an IP connectivity problem. Run traceroute -n 8.8.8.8 and see where it stops: if it's in your home/office, check your networking equipment. If you can reach your ISP, complain to them.

          • If it does, you specifically have a DNS problem. Check the contents of /etc/resolv.conf; there should be a line like nameserver 1.2.3.4 (possibly more than one of them). If the lines are there, there is probably a transient problem within your ISP, and you may be able to work around it by adding nameserver 8.8.8.8 to that file (this declares an extra DNS server, which is provided free of charge by Google). If the first number after nameserver is 127, then there is a DNS relay on your machine (this is a good thing), and you must configure that DNS relay rather than modify /etc/resolv.conf. On modern versions of Ubuntu, there is a DNS relay by default, it's Dnsmasq, and it's controlled by D-Bus.






          share|improve this answer





















          • 1





            Note: ping 8.8.8.8 -c3 pings only 3 times, you don't need to Ctrl+C then. You may use any number in the parameter, like -c5 , -c1 , -c100 etc.

            – Arda
            Nov 5 '14 at 20:58











          • nameserver has to be placed with the hostname's machine?

            – albert
            Mar 7 '18 at 17:47











          • @albert The /etc/resolv.conf that matters is the one on the machine you're on. But on modern systems, it just points to the local machine, and if you have DNS troubles, you must work with D-Bus and NetworkManager.

            – Gilles
            Mar 8 '18 at 7:41



















          8














          You can comment the unresolved repo from the file sources.list found on dir /etc/apt/



          After modifying the sources.list, clean the apt-get repo as



          apt-get clean


          Then update



          apt-get update


          The error will gone away






          share|improve this answer



















          • 1





            This is a permanent solution to a temporary DNS problem. If you forget to change it back, software from that repository won't be updated or available for install anymore.

            – Chai T. Rex
            Jan 27 '18 at 13:04



















          3














          Sometimes, when you are behind a proxy server, it is even necessary, that you generate a apt.conf file in /etc/apt/ and fill it with the specific entries, like:



          Acquire::http::proxy "http://<yourproxyserver>:<Port>";
          Acquire::https::proxy "http://<yourproxyserver>:<Port>";
          Acquire::ftp::proxy "http://<yourproxyserver>:<Port>";


          If there is an authentification required, the config file looks like:



          Acquire::http::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";
          Acquire::https::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";
          Acquire::ftp::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";





          share|improve this answer

































            0














            I experienced similar errors when running apt-get commands. It turns out I had the Software Update Panel open on the console.

            This seemed to be blocking the command line apt-get, but I'm not certain.






            share|improve this answer

































              0














              This is a DNS problem. Check your /etc/resolv.conf file.



              for example in my case when i had this problem & checked this file , the file was empty!
              but it should contains your dns-nameserver



              mine:



              nameserver 192.168.10.x


              192.168.10.x is my gateway ip address






              share|improve this answer





















              • 3





                Welcome to AskUbuntu! If you wanna help, make more verbose answer. I mean, cover most possible scenarios and ways to go or post link to appropriate tutorial.

                – Danatela
                Jul 22 '13 at 8:19






              • 1





                Could you clarify what one should check in /etc/resolv.conf?

                – papukaija
                Jul 22 '13 at 9:01



















              0














              I had this error. Following a tip from Linode support, I commented out all the IPv6 lines in /etc/hosts and then apt-get update started working.






              share|improve this answer































                0














                For those who are using EC2, remember to check that your security group settings allow outbound connections to the websites you are updating from. You can set All traffic outbound setting and see if it works.






                share|improve this answer































                  0














                  The accepted solution does not work for me. In the first place, only apt-get update warns me about Temporary failure resolving 'foo.com', but when I try with nslookup foo.com or ping foo.com, it works fine!



                  My incredibly dirty hack/fix for solving this bug, is to add the resolved domains manually to /etc/hosts with this short script:



                  resolveAptHosts()
                  {
                  mapfile -t hosts < <(
                  sed -n -r '/^#/d; s;deb(-src)? (http://|ftp://)?([^/ ]+).*;3;p'
                  /etc/apt/sources.list | sort | uniq )
                  # delete all hosts from /etc/hosts, e.g., from an earlier call
                  sudo sed -i -r '/^[0-9]{1,3}(.[0-9]{1,3}){3}[ t]+('"$( printf '|%s'
                  "${hosts[@]//./\.}" | sed 's/^|//' )"')[ t]*$/d' /etc/hosts
                  for host in ${hosts[@]}; do
                  ip=$( nslookup "$host" | sed -n -r 's|Address:[ t]*([0-9.]+).*|1|p' |
                  tail -1 )
                  sudo bash -c "echo $ip $host >> /etc/hosts"
                  done
                  }


                  Now updating should work:



                  resolveAptHosts && sudo apt-get update


                  If anyone knows why this workaround works and how to solve this bug for real, I'll be eternally thankful. I also tried using sudo apt-get update -o Acquire::ForceIPv4=true in order to exclude IPv6 resolve problems, but that didn't help either.






                  share|improve this answer

































                    0














                    This issue can also be caused by a wrongly named interface. For example a Temporary failure resolving error message can be caused by an interface which is not named eth0 but is incorrectly named eml instead.






                    share|improve this answer































                      0














                      I got the same issue in a vmware virtual machine, host and guest both are ubuntu.
                      I solved the issue changing the setting of the virtual machine. Instead of using NAT, I set Bridged.
                      It worked for me






                      share|improve this answer






















                        protected by Community Aug 22 '14 at 12:54



                        Thank you for your interest in this question.
                        Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                        Would you like to answer one of these unanswered questions instead?














                        11 Answers
                        11






                        active

                        oldest

                        votes








                        11 Answers
                        11






                        active

                        oldest

                        votes









                        active

                        oldest

                        votes






                        active

                        oldest

                        votes









                        117














                        overview



                        There are two parts to your question:




                        • fixing temporary resolve messages

                        • fixing the package management issues


                        Temporary resolve



                        It is likely that this issue is either:




                        • temporary due to your Internet Service Provider not correctly forwarding internet naming (DNS) to either its or external DNS servers, or

                        • due to a change in your network has similarly blocked this naming - for example, new router/modem, reconfiguring a switch with a new configuration.


                        Lets look at the possible DNS resolving issues.



                        First, temporarily add a known DNS server to your system.



                        echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null


                        Then run sudo apt-get update.



                        If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you (or just contact your ISP) - or you can permanently add a DNS server to your system:



                        echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null


                        8.8.8.8 is Google's own DNS server.



                        source



                        Another example DNS server you could use is OpenDNS - for example:



                        echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null


                        package-management issues



                        In addition to the temporary resolve issues - you have a few package management issues that need to be corrected - I'm assuming you have tried recently to upgrade from one Ubuntu version to the next recommended version - in your case from Natty (11.04) to Oneiric (11.10)



                        Open a terminal and type



                        sudo nano /etc/apt/sources.list


                        Look for lines that have your a different distribution name in the list than you were expecting - in your case - you have upgraded to oneiric but you have another release name natty



                        For example, look for lines that look like deb http:/archive.canonical.com/ natty backports



                        Add a # to the beginning of the line to comment it out - for example



                        #deb http:/archive.canonical.com/ natty backports



                        Save and re-run:



                        sudo apt-get update && sudo apt-get upgrade


                        You should not have any more release naming errors.



                        At the time of writing this, possible common release names include lucid, maverick, natty, oneiric, precise, quantal, raring, saucy, trusty, utopic and vivid.






                        share|improve this answer


























                        • Perfectly works :)

                          – Maduka Jayalath
                          Nov 11 '12 at 13:22











                        • When one name pops out during the update, you might skip the DNS fiddling and go directly to the sources list.

                          – SPRBRN
                          Apr 24 '14 at 15:11











                        • Still works perfectly with 15.04 and 15.10

                          – lxx
                          Jan 7 '16 at 7:51











                        • Very thorough answer. Thank you.

                          – jamescampbell
                          Aug 2 '16 at 13:39






                        • 1





                          What if this doesn't work?

                          – Matt G
                          Jan 12 '17 at 0:46
















                        117














                        overview



                        There are two parts to your question:




                        • fixing temporary resolve messages

                        • fixing the package management issues


                        Temporary resolve



                        It is likely that this issue is either:




                        • temporary due to your Internet Service Provider not correctly forwarding internet naming (DNS) to either its or external DNS servers, or

                        • due to a change in your network has similarly blocked this naming - for example, new router/modem, reconfiguring a switch with a new configuration.


                        Lets look at the possible DNS resolving issues.



                        First, temporarily add a known DNS server to your system.



                        echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null


                        Then run sudo apt-get update.



                        If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you (or just contact your ISP) - or you can permanently add a DNS server to your system:



                        echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null


                        8.8.8.8 is Google's own DNS server.



                        source



                        Another example DNS server you could use is OpenDNS - for example:



                        echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null


                        package-management issues



                        In addition to the temporary resolve issues - you have a few package management issues that need to be corrected - I'm assuming you have tried recently to upgrade from one Ubuntu version to the next recommended version - in your case from Natty (11.04) to Oneiric (11.10)



                        Open a terminal and type



                        sudo nano /etc/apt/sources.list


                        Look for lines that have your a different distribution name in the list than you were expecting - in your case - you have upgraded to oneiric but you have another release name natty



                        For example, look for lines that look like deb http:/archive.canonical.com/ natty backports



                        Add a # to the beginning of the line to comment it out - for example



                        #deb http:/archive.canonical.com/ natty backports



                        Save and re-run:



                        sudo apt-get update && sudo apt-get upgrade


                        You should not have any more release naming errors.



                        At the time of writing this, possible common release names include lucid, maverick, natty, oneiric, precise, quantal, raring, saucy, trusty, utopic and vivid.






                        share|improve this answer


























                        • Perfectly works :)

                          – Maduka Jayalath
                          Nov 11 '12 at 13:22











                        • When one name pops out during the update, you might skip the DNS fiddling and go directly to the sources list.

                          – SPRBRN
                          Apr 24 '14 at 15:11











                        • Still works perfectly with 15.04 and 15.10

                          – lxx
                          Jan 7 '16 at 7:51











                        • Very thorough answer. Thank you.

                          – jamescampbell
                          Aug 2 '16 at 13:39






                        • 1





                          What if this doesn't work?

                          – Matt G
                          Jan 12 '17 at 0:46














                        117












                        117








                        117







                        overview



                        There are two parts to your question:




                        • fixing temporary resolve messages

                        • fixing the package management issues


                        Temporary resolve



                        It is likely that this issue is either:




                        • temporary due to your Internet Service Provider not correctly forwarding internet naming (DNS) to either its or external DNS servers, or

                        • due to a change in your network has similarly blocked this naming - for example, new router/modem, reconfiguring a switch with a new configuration.


                        Lets look at the possible DNS resolving issues.



                        First, temporarily add a known DNS server to your system.



                        echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null


                        Then run sudo apt-get update.



                        If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you (or just contact your ISP) - or you can permanently add a DNS server to your system:



                        echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null


                        8.8.8.8 is Google's own DNS server.



                        source



                        Another example DNS server you could use is OpenDNS - for example:



                        echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null


                        package-management issues



                        In addition to the temporary resolve issues - you have a few package management issues that need to be corrected - I'm assuming you have tried recently to upgrade from one Ubuntu version to the next recommended version - in your case from Natty (11.04) to Oneiric (11.10)



                        Open a terminal and type



                        sudo nano /etc/apt/sources.list


                        Look for lines that have your a different distribution name in the list than you were expecting - in your case - you have upgraded to oneiric but you have another release name natty



                        For example, look for lines that look like deb http:/archive.canonical.com/ natty backports



                        Add a # to the beginning of the line to comment it out - for example



                        #deb http:/archive.canonical.com/ natty backports



                        Save and re-run:



                        sudo apt-get update && sudo apt-get upgrade


                        You should not have any more release naming errors.



                        At the time of writing this, possible common release names include lucid, maverick, natty, oneiric, precise, quantal, raring, saucy, trusty, utopic and vivid.






                        share|improve this answer















                        overview



                        There are two parts to your question:




                        • fixing temporary resolve messages

                        • fixing the package management issues


                        Temporary resolve



                        It is likely that this issue is either:




                        • temporary due to your Internet Service Provider not correctly forwarding internet naming (DNS) to either its or external DNS servers, or

                        • due to a change in your network has similarly blocked this naming - for example, new router/modem, reconfiguring a switch with a new configuration.


                        Lets look at the possible DNS resolving issues.



                        First, temporarily add a known DNS server to your system.



                        echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null


                        Then run sudo apt-get update.



                        If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you (or just contact your ISP) - or you can permanently add a DNS server to your system:



                        echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null


                        8.8.8.8 is Google's own DNS server.



                        source



                        Another example DNS server you could use is OpenDNS - for example:



                        echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null


                        package-management issues



                        In addition to the temporary resolve issues - you have a few package management issues that need to be corrected - I'm assuming you have tried recently to upgrade from one Ubuntu version to the next recommended version - in your case from Natty (11.04) to Oneiric (11.10)



                        Open a terminal and type



                        sudo nano /etc/apt/sources.list


                        Look for lines that have your a different distribution name in the list than you were expecting - in your case - you have upgraded to oneiric but you have another release name natty



                        For example, look for lines that look like deb http:/archive.canonical.com/ natty backports



                        Add a # to the beginning of the line to comment it out - for example



                        #deb http:/archive.canonical.com/ natty backports



                        Save and re-run:



                        sudo apt-get update && sudo apt-get upgrade


                        You should not have any more release naming errors.



                        At the time of writing this, possible common release names include lucid, maverick, natty, oneiric, precise, quantal, raring, saucy, trusty, utopic and vivid.







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Sep 20 '15 at 14:03









                        angulared

                        1751218




                        1751218










                        answered Dec 30 '11 at 18:24









                        fossfreedomfossfreedom

                        149k37327372




                        149k37327372













                        • Perfectly works :)

                          – Maduka Jayalath
                          Nov 11 '12 at 13:22











                        • When one name pops out during the update, you might skip the DNS fiddling and go directly to the sources list.

                          – SPRBRN
                          Apr 24 '14 at 15:11











                        • Still works perfectly with 15.04 and 15.10

                          – lxx
                          Jan 7 '16 at 7:51











                        • Very thorough answer. Thank you.

                          – jamescampbell
                          Aug 2 '16 at 13:39






                        • 1





                          What if this doesn't work?

                          – Matt G
                          Jan 12 '17 at 0:46



















                        • Perfectly works :)

                          – Maduka Jayalath
                          Nov 11 '12 at 13:22











                        • When one name pops out during the update, you might skip the DNS fiddling and go directly to the sources list.

                          – SPRBRN
                          Apr 24 '14 at 15:11











                        • Still works perfectly with 15.04 and 15.10

                          – lxx
                          Jan 7 '16 at 7:51











                        • Very thorough answer. Thank you.

                          – jamescampbell
                          Aug 2 '16 at 13:39






                        • 1





                          What if this doesn't work?

                          – Matt G
                          Jan 12 '17 at 0:46

















                        Perfectly works :)

                        – Maduka Jayalath
                        Nov 11 '12 at 13:22





                        Perfectly works :)

                        – Maduka Jayalath
                        Nov 11 '12 at 13:22













                        When one name pops out during the update, you might skip the DNS fiddling and go directly to the sources list.

                        – SPRBRN
                        Apr 24 '14 at 15:11





                        When one name pops out during the update, you might skip the DNS fiddling and go directly to the sources list.

                        – SPRBRN
                        Apr 24 '14 at 15:11













                        Still works perfectly with 15.04 and 15.10

                        – lxx
                        Jan 7 '16 at 7:51





                        Still works perfectly with 15.04 and 15.10

                        – lxx
                        Jan 7 '16 at 7:51













                        Very thorough answer. Thank you.

                        – jamescampbell
                        Aug 2 '16 at 13:39





                        Very thorough answer. Thank you.

                        – jamescampbell
                        Aug 2 '16 at 13:39




                        1




                        1





                        What if this doesn't work?

                        – Matt G
                        Jan 12 '17 at 0:46





                        What if this doesn't work?

                        – Matt G
                        Jan 12 '17 at 0:46













                        9














                        Note that this answer was written for old versions of Ubuntu. Current versions use a local nameserver controlled by D-Bus, for which the diagnosis part of this answer applies, but not the solution. If /etc/resolv.conf contains nameserver 127.0.1.1 or more generally nameserver 127.X.Y.Z, don't modify it.



                        “Temporary failure resolving …” means that your DNS, i.e. the translation from host names to IP addresses, is not working. Did you reconfigure something on your machine recently? If not, this may be a transient error at your ISP.



                        Does ping -n 8.8.8.8 show lines like 64 bytes from 8.8.8.8: …? (Press Ctrl+C to stop ping.)




                        • If it doesn't, you specifically have an IP connectivity problem. Run traceroute -n 8.8.8.8 and see where it stops: if it's in your home/office, check your networking equipment. If you can reach your ISP, complain to them.

                        • If it does, you specifically have a DNS problem. Check the contents of /etc/resolv.conf; there should be a line like nameserver 1.2.3.4 (possibly more than one of them). If the lines are there, there is probably a transient problem within your ISP, and you may be able to work around it by adding nameserver 8.8.8.8 to that file (this declares an extra DNS server, which is provided free of charge by Google). If the first number after nameserver is 127, then there is a DNS relay on your machine (this is a good thing), and you must configure that DNS relay rather than modify /etc/resolv.conf. On modern versions of Ubuntu, there is a DNS relay by default, it's Dnsmasq, and it's controlled by D-Bus.






                        share|improve this answer





















                        • 1





                          Note: ping 8.8.8.8 -c3 pings only 3 times, you don't need to Ctrl+C then. You may use any number in the parameter, like -c5 , -c1 , -c100 etc.

                          – Arda
                          Nov 5 '14 at 20:58











                        • nameserver has to be placed with the hostname's machine?

                          – albert
                          Mar 7 '18 at 17:47











                        • @albert The /etc/resolv.conf that matters is the one on the machine you're on. But on modern systems, it just points to the local machine, and if you have DNS troubles, you must work with D-Bus and NetworkManager.

                          – Gilles
                          Mar 8 '18 at 7:41
















                        9














                        Note that this answer was written for old versions of Ubuntu. Current versions use a local nameserver controlled by D-Bus, for which the diagnosis part of this answer applies, but not the solution. If /etc/resolv.conf contains nameserver 127.0.1.1 or more generally nameserver 127.X.Y.Z, don't modify it.



                        “Temporary failure resolving …” means that your DNS, i.e. the translation from host names to IP addresses, is not working. Did you reconfigure something on your machine recently? If not, this may be a transient error at your ISP.



                        Does ping -n 8.8.8.8 show lines like 64 bytes from 8.8.8.8: …? (Press Ctrl+C to stop ping.)




                        • If it doesn't, you specifically have an IP connectivity problem. Run traceroute -n 8.8.8.8 and see where it stops: if it's in your home/office, check your networking equipment. If you can reach your ISP, complain to them.

                        • If it does, you specifically have a DNS problem. Check the contents of /etc/resolv.conf; there should be a line like nameserver 1.2.3.4 (possibly more than one of them). If the lines are there, there is probably a transient problem within your ISP, and you may be able to work around it by adding nameserver 8.8.8.8 to that file (this declares an extra DNS server, which is provided free of charge by Google). If the first number after nameserver is 127, then there is a DNS relay on your machine (this is a good thing), and you must configure that DNS relay rather than modify /etc/resolv.conf. On modern versions of Ubuntu, there is a DNS relay by default, it's Dnsmasq, and it's controlled by D-Bus.






                        share|improve this answer





















                        • 1





                          Note: ping 8.8.8.8 -c3 pings only 3 times, you don't need to Ctrl+C then. You may use any number in the parameter, like -c5 , -c1 , -c100 etc.

                          – Arda
                          Nov 5 '14 at 20:58











                        • nameserver has to be placed with the hostname's machine?

                          – albert
                          Mar 7 '18 at 17:47











                        • @albert The /etc/resolv.conf that matters is the one on the machine you're on. But on modern systems, it just points to the local machine, and if you have DNS troubles, you must work with D-Bus and NetworkManager.

                          – Gilles
                          Mar 8 '18 at 7:41














                        9












                        9








                        9







                        Note that this answer was written for old versions of Ubuntu. Current versions use a local nameserver controlled by D-Bus, for which the diagnosis part of this answer applies, but not the solution. If /etc/resolv.conf contains nameserver 127.0.1.1 or more generally nameserver 127.X.Y.Z, don't modify it.



                        “Temporary failure resolving …” means that your DNS, i.e. the translation from host names to IP addresses, is not working. Did you reconfigure something on your machine recently? If not, this may be a transient error at your ISP.



                        Does ping -n 8.8.8.8 show lines like 64 bytes from 8.8.8.8: …? (Press Ctrl+C to stop ping.)




                        • If it doesn't, you specifically have an IP connectivity problem. Run traceroute -n 8.8.8.8 and see where it stops: if it's in your home/office, check your networking equipment. If you can reach your ISP, complain to them.

                        • If it does, you specifically have a DNS problem. Check the contents of /etc/resolv.conf; there should be a line like nameserver 1.2.3.4 (possibly more than one of them). If the lines are there, there is probably a transient problem within your ISP, and you may be able to work around it by adding nameserver 8.8.8.8 to that file (this declares an extra DNS server, which is provided free of charge by Google). If the first number after nameserver is 127, then there is a DNS relay on your machine (this is a good thing), and you must configure that DNS relay rather than modify /etc/resolv.conf. On modern versions of Ubuntu, there is a DNS relay by default, it's Dnsmasq, and it's controlled by D-Bus.






                        share|improve this answer















                        Note that this answer was written for old versions of Ubuntu. Current versions use a local nameserver controlled by D-Bus, for which the diagnosis part of this answer applies, but not the solution. If /etc/resolv.conf contains nameserver 127.0.1.1 or more generally nameserver 127.X.Y.Z, don't modify it.



                        “Temporary failure resolving …” means that your DNS, i.e. the translation from host names to IP addresses, is not working. Did you reconfigure something on your machine recently? If not, this may be a transient error at your ISP.



                        Does ping -n 8.8.8.8 show lines like 64 bytes from 8.8.8.8: …? (Press Ctrl+C to stop ping.)




                        • If it doesn't, you specifically have an IP connectivity problem. Run traceroute -n 8.8.8.8 and see where it stops: if it's in your home/office, check your networking equipment. If you can reach your ISP, complain to them.

                        • If it does, you specifically have a DNS problem. Check the contents of /etc/resolv.conf; there should be a line like nameserver 1.2.3.4 (possibly more than one of them). If the lines are there, there is probably a transient problem within your ISP, and you may be able to work around it by adding nameserver 8.8.8.8 to that file (this declares an extra DNS server, which is provided free of charge by Google). If the first number after nameserver is 127, then there is a DNS relay on your machine (this is a good thing), and you must configure that DNS relay rather than modify /etc/resolv.conf. On modern versions of Ubuntu, there is a DNS relay by default, it's Dnsmasq, and it's controlled by D-Bus.







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Mar 8 '18 at 7:40

























                        answered Dec 30 '11 at 18:17









                        GillesGilles

                        44.7k13101140




                        44.7k13101140








                        • 1





                          Note: ping 8.8.8.8 -c3 pings only 3 times, you don't need to Ctrl+C then. You may use any number in the parameter, like -c5 , -c1 , -c100 etc.

                          – Arda
                          Nov 5 '14 at 20:58











                        • nameserver has to be placed with the hostname's machine?

                          – albert
                          Mar 7 '18 at 17:47











                        • @albert The /etc/resolv.conf that matters is the one on the machine you're on. But on modern systems, it just points to the local machine, and if you have DNS troubles, you must work with D-Bus and NetworkManager.

                          – Gilles
                          Mar 8 '18 at 7:41














                        • 1





                          Note: ping 8.8.8.8 -c3 pings only 3 times, you don't need to Ctrl+C then. You may use any number in the parameter, like -c5 , -c1 , -c100 etc.

                          – Arda
                          Nov 5 '14 at 20:58











                        • nameserver has to be placed with the hostname's machine?

                          – albert
                          Mar 7 '18 at 17:47











                        • @albert The /etc/resolv.conf that matters is the one on the machine you're on. But on modern systems, it just points to the local machine, and if you have DNS troubles, you must work with D-Bus and NetworkManager.

                          – Gilles
                          Mar 8 '18 at 7:41








                        1




                        1





                        Note: ping 8.8.8.8 -c3 pings only 3 times, you don't need to Ctrl+C then. You may use any number in the parameter, like -c5 , -c1 , -c100 etc.

                        – Arda
                        Nov 5 '14 at 20:58





                        Note: ping 8.8.8.8 -c3 pings only 3 times, you don't need to Ctrl+C then. You may use any number in the parameter, like -c5 , -c1 , -c100 etc.

                        – Arda
                        Nov 5 '14 at 20:58













                        nameserver has to be placed with the hostname's machine?

                        – albert
                        Mar 7 '18 at 17:47





                        nameserver has to be placed with the hostname's machine?

                        – albert
                        Mar 7 '18 at 17:47













                        @albert The /etc/resolv.conf that matters is the one on the machine you're on. But on modern systems, it just points to the local machine, and if you have DNS troubles, you must work with D-Bus and NetworkManager.

                        – Gilles
                        Mar 8 '18 at 7:41





                        @albert The /etc/resolv.conf that matters is the one on the machine you're on. But on modern systems, it just points to the local machine, and if you have DNS troubles, you must work with D-Bus and NetworkManager.

                        – Gilles
                        Mar 8 '18 at 7:41











                        8














                        You can comment the unresolved repo from the file sources.list found on dir /etc/apt/



                        After modifying the sources.list, clean the apt-get repo as



                        apt-get clean


                        Then update



                        apt-get update


                        The error will gone away






                        share|improve this answer



















                        • 1





                          This is a permanent solution to a temporary DNS problem. If you forget to change it back, software from that repository won't be updated or available for install anymore.

                          – Chai T. Rex
                          Jan 27 '18 at 13:04
















                        8














                        You can comment the unresolved repo from the file sources.list found on dir /etc/apt/



                        After modifying the sources.list, clean the apt-get repo as



                        apt-get clean


                        Then update



                        apt-get update


                        The error will gone away






                        share|improve this answer



















                        • 1





                          This is a permanent solution to a temporary DNS problem. If you forget to change it back, software from that repository won't be updated or available for install anymore.

                          – Chai T. Rex
                          Jan 27 '18 at 13:04














                        8












                        8








                        8







                        You can comment the unresolved repo from the file sources.list found on dir /etc/apt/



                        After modifying the sources.list, clean the apt-get repo as



                        apt-get clean


                        Then update



                        apt-get update


                        The error will gone away






                        share|improve this answer













                        You can comment the unresolved repo from the file sources.list found on dir /etc/apt/



                        After modifying the sources.list, clean the apt-get repo as



                        apt-get clean


                        Then update



                        apt-get update


                        The error will gone away







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Dec 30 '11 at 17:41









                        MughilMughil

                        1,124815




                        1,124815








                        • 1





                          This is a permanent solution to a temporary DNS problem. If you forget to change it back, software from that repository won't be updated or available for install anymore.

                          – Chai T. Rex
                          Jan 27 '18 at 13:04














                        • 1





                          This is a permanent solution to a temporary DNS problem. If you forget to change it back, software from that repository won't be updated or available for install anymore.

                          – Chai T. Rex
                          Jan 27 '18 at 13:04








                        1




                        1





                        This is a permanent solution to a temporary DNS problem. If you forget to change it back, software from that repository won't be updated or available for install anymore.

                        – Chai T. Rex
                        Jan 27 '18 at 13:04





                        This is a permanent solution to a temporary DNS problem. If you forget to change it back, software from that repository won't be updated or available for install anymore.

                        – Chai T. Rex
                        Jan 27 '18 at 13:04











                        3














                        Sometimes, when you are behind a proxy server, it is even necessary, that you generate a apt.conf file in /etc/apt/ and fill it with the specific entries, like:



                        Acquire::http::proxy "http://<yourproxyserver>:<Port>";
                        Acquire::https::proxy "http://<yourproxyserver>:<Port>";
                        Acquire::ftp::proxy "http://<yourproxyserver>:<Port>";


                        If there is an authentification required, the config file looks like:



                        Acquire::http::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";
                        Acquire::https::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";
                        Acquire::ftp::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";





                        share|improve this answer






























                          3














                          Sometimes, when you are behind a proxy server, it is even necessary, that you generate a apt.conf file in /etc/apt/ and fill it with the specific entries, like:



                          Acquire::http::proxy "http://<yourproxyserver>:<Port>";
                          Acquire::https::proxy "http://<yourproxyserver>:<Port>";
                          Acquire::ftp::proxy "http://<yourproxyserver>:<Port>";


                          If there is an authentification required, the config file looks like:



                          Acquire::http::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";
                          Acquire::https::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";
                          Acquire::ftp::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";





                          share|improve this answer




























                            3












                            3








                            3







                            Sometimes, when you are behind a proxy server, it is even necessary, that you generate a apt.conf file in /etc/apt/ and fill it with the specific entries, like:



                            Acquire::http::proxy "http://<yourproxyserver>:<Port>";
                            Acquire::https::proxy "http://<yourproxyserver>:<Port>";
                            Acquire::ftp::proxy "http://<yourproxyserver>:<Port>";


                            If there is an authentification required, the config file looks like:



                            Acquire::http::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";
                            Acquire::https::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";
                            Acquire::ftp::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";





                            share|improve this answer















                            Sometimes, when you are behind a proxy server, it is even necessary, that you generate a apt.conf file in /etc/apt/ and fill it with the specific entries, like:



                            Acquire::http::proxy "http://<yourproxyserver>:<Port>";
                            Acquire::https::proxy "http://<yourproxyserver>:<Port>";
                            Acquire::ftp::proxy "http://<yourproxyserver>:<Port>";


                            If there is an authentification required, the config file looks like:



                            Acquire::http::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";
                            Acquire::https::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";
                            Acquire::ftp::proxy "http://<domainuser>:<password>@<yourproxyserver>:<Port>";






                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Sep 19 '12 at 8:15









                            Peachy

                            4,92672843




                            4,92672843










                            answered Aug 21 '12 at 10:03









                            DirkDirk

                            311




                            311























                                0














                                I experienced similar errors when running apt-get commands. It turns out I had the Software Update Panel open on the console.

                                This seemed to be blocking the command line apt-get, but I'm not certain.






                                share|improve this answer






























                                  0














                                  I experienced similar errors when running apt-get commands. It turns out I had the Software Update Panel open on the console.

                                  This seemed to be blocking the command line apt-get, but I'm not certain.






                                  share|improve this answer




























                                    0












                                    0








                                    0







                                    I experienced similar errors when running apt-get commands. It turns out I had the Software Update Panel open on the console.

                                    This seemed to be blocking the command line apt-get, but I'm not certain.






                                    share|improve this answer















                                    I experienced similar errors when running apt-get commands. It turns out I had the Software Update Panel open on the console.

                                    This seemed to be blocking the command line apt-get, but I'm not certain.







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Oct 29 '12 at 9:03









                                    NorTicUs

                                    1,99611432




                                    1,99611432










                                    answered May 9 '12 at 17:15









                                    JohnJohn

                                    91




                                    91























                                        0














                                        This is a DNS problem. Check your /etc/resolv.conf file.



                                        for example in my case when i had this problem & checked this file , the file was empty!
                                        but it should contains your dns-nameserver



                                        mine:



                                        nameserver 192.168.10.x


                                        192.168.10.x is my gateway ip address






                                        share|improve this answer





















                                        • 3





                                          Welcome to AskUbuntu! If you wanna help, make more verbose answer. I mean, cover most possible scenarios and ways to go or post link to appropriate tutorial.

                                          – Danatela
                                          Jul 22 '13 at 8:19






                                        • 1





                                          Could you clarify what one should check in /etc/resolv.conf?

                                          – papukaija
                                          Jul 22 '13 at 9:01
















                                        0














                                        This is a DNS problem. Check your /etc/resolv.conf file.



                                        for example in my case when i had this problem & checked this file , the file was empty!
                                        but it should contains your dns-nameserver



                                        mine:



                                        nameserver 192.168.10.x


                                        192.168.10.x is my gateway ip address






                                        share|improve this answer





















                                        • 3





                                          Welcome to AskUbuntu! If you wanna help, make more verbose answer. I mean, cover most possible scenarios and ways to go or post link to appropriate tutorial.

                                          – Danatela
                                          Jul 22 '13 at 8:19






                                        • 1





                                          Could you clarify what one should check in /etc/resolv.conf?

                                          – papukaija
                                          Jul 22 '13 at 9:01














                                        0












                                        0








                                        0







                                        This is a DNS problem. Check your /etc/resolv.conf file.



                                        for example in my case when i had this problem & checked this file , the file was empty!
                                        but it should contains your dns-nameserver



                                        mine:



                                        nameserver 192.168.10.x


                                        192.168.10.x is my gateway ip address






                                        share|improve this answer















                                        This is a DNS problem. Check your /etc/resolv.conf file.



                                        for example in my case when i had this problem & checked this file , the file was empty!
                                        but it should contains your dns-nameserver



                                        mine:



                                        nameserver 192.168.10.x


                                        192.168.10.x is my gateway ip address







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited Jul 23 '13 at 8:46

























                                        answered Jul 22 '13 at 7:53









                                        parisssssparisssss

                                        1014




                                        1014








                                        • 3





                                          Welcome to AskUbuntu! If you wanna help, make more verbose answer. I mean, cover most possible scenarios and ways to go or post link to appropriate tutorial.

                                          – Danatela
                                          Jul 22 '13 at 8:19






                                        • 1





                                          Could you clarify what one should check in /etc/resolv.conf?

                                          – papukaija
                                          Jul 22 '13 at 9:01














                                        • 3





                                          Welcome to AskUbuntu! If you wanna help, make more verbose answer. I mean, cover most possible scenarios and ways to go or post link to appropriate tutorial.

                                          – Danatela
                                          Jul 22 '13 at 8:19






                                        • 1





                                          Could you clarify what one should check in /etc/resolv.conf?

                                          – papukaija
                                          Jul 22 '13 at 9:01








                                        3




                                        3





                                        Welcome to AskUbuntu! If you wanna help, make more verbose answer. I mean, cover most possible scenarios and ways to go or post link to appropriate tutorial.

                                        – Danatela
                                        Jul 22 '13 at 8:19





                                        Welcome to AskUbuntu! If you wanna help, make more verbose answer. I mean, cover most possible scenarios and ways to go or post link to appropriate tutorial.

                                        – Danatela
                                        Jul 22 '13 at 8:19




                                        1




                                        1





                                        Could you clarify what one should check in /etc/resolv.conf?

                                        – papukaija
                                        Jul 22 '13 at 9:01





                                        Could you clarify what one should check in /etc/resolv.conf?

                                        – papukaija
                                        Jul 22 '13 at 9:01











                                        0














                                        I had this error. Following a tip from Linode support, I commented out all the IPv6 lines in /etc/hosts and then apt-get update started working.






                                        share|improve this answer




























                                          0














                                          I had this error. Following a tip from Linode support, I commented out all the IPv6 lines in /etc/hosts and then apt-get update started working.






                                          share|improve this answer


























                                            0












                                            0








                                            0







                                            I had this error. Following a tip from Linode support, I commented out all the IPv6 lines in /etc/hosts and then apt-get update started working.






                                            share|improve this answer













                                            I had this error. Following a tip from Linode support, I commented out all the IPv6 lines in /etc/hosts and then apt-get update started working.







                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Feb 5 '14 at 21:42









                                            lauralaura

                                            1011




                                            1011























                                                0














                                                For those who are using EC2, remember to check that your security group settings allow outbound connections to the websites you are updating from. You can set All traffic outbound setting and see if it works.






                                                share|improve this answer




























                                                  0














                                                  For those who are using EC2, remember to check that your security group settings allow outbound connections to the websites you are updating from. You can set All traffic outbound setting and see if it works.






                                                  share|improve this answer


























                                                    0












                                                    0








                                                    0







                                                    For those who are using EC2, remember to check that your security group settings allow outbound connections to the websites you are updating from. You can set All traffic outbound setting and see if it works.






                                                    share|improve this answer













                                                    For those who are using EC2, remember to check that your security group settings allow outbound connections to the websites you are updating from. You can set All traffic outbound setting and see if it works.







                                                    share|improve this answer












                                                    share|improve this answer



                                                    share|improve this answer










                                                    answered Mar 15 '14 at 18:08









                                                    KasperiKasperi

                                                    1011




                                                    1011























                                                        0














                                                        The accepted solution does not work for me. In the first place, only apt-get update warns me about Temporary failure resolving 'foo.com', but when I try with nslookup foo.com or ping foo.com, it works fine!



                                                        My incredibly dirty hack/fix for solving this bug, is to add the resolved domains manually to /etc/hosts with this short script:



                                                        resolveAptHosts()
                                                        {
                                                        mapfile -t hosts < <(
                                                        sed -n -r '/^#/d; s;deb(-src)? (http://|ftp://)?([^/ ]+).*;3;p'
                                                        /etc/apt/sources.list | sort | uniq )
                                                        # delete all hosts from /etc/hosts, e.g., from an earlier call
                                                        sudo sed -i -r '/^[0-9]{1,3}(.[0-9]{1,3}){3}[ t]+('"$( printf '|%s'
                                                        "${hosts[@]//./\.}" | sed 's/^|//' )"')[ t]*$/d' /etc/hosts
                                                        for host in ${hosts[@]}; do
                                                        ip=$( nslookup "$host" | sed -n -r 's|Address:[ t]*([0-9.]+).*|1|p' |
                                                        tail -1 )
                                                        sudo bash -c "echo $ip $host >> /etc/hosts"
                                                        done
                                                        }


                                                        Now updating should work:



                                                        resolveAptHosts && sudo apt-get update


                                                        If anyone knows why this workaround works and how to solve this bug for real, I'll be eternally thankful. I also tried using sudo apt-get update -o Acquire::ForceIPv4=true in order to exclude IPv6 resolve problems, but that didn't help either.






                                                        share|improve this answer






























                                                          0














                                                          The accepted solution does not work for me. In the first place, only apt-get update warns me about Temporary failure resolving 'foo.com', but when I try with nslookup foo.com or ping foo.com, it works fine!



                                                          My incredibly dirty hack/fix for solving this bug, is to add the resolved domains manually to /etc/hosts with this short script:



                                                          resolveAptHosts()
                                                          {
                                                          mapfile -t hosts < <(
                                                          sed -n -r '/^#/d; s;deb(-src)? (http://|ftp://)?([^/ ]+).*;3;p'
                                                          /etc/apt/sources.list | sort | uniq )
                                                          # delete all hosts from /etc/hosts, e.g., from an earlier call
                                                          sudo sed -i -r '/^[0-9]{1,3}(.[0-9]{1,3}){3}[ t]+('"$( printf '|%s'
                                                          "${hosts[@]//./\.}" | sed 's/^|//' )"')[ t]*$/d' /etc/hosts
                                                          for host in ${hosts[@]}; do
                                                          ip=$( nslookup "$host" | sed -n -r 's|Address:[ t]*([0-9.]+).*|1|p' |
                                                          tail -1 )
                                                          sudo bash -c "echo $ip $host >> /etc/hosts"
                                                          done
                                                          }


                                                          Now updating should work:



                                                          resolveAptHosts && sudo apt-get update


                                                          If anyone knows why this workaround works and how to solve this bug for real, I'll be eternally thankful. I also tried using sudo apt-get update -o Acquire::ForceIPv4=true in order to exclude IPv6 resolve problems, but that didn't help either.






                                                          share|improve this answer




























                                                            0












                                                            0








                                                            0







                                                            The accepted solution does not work for me. In the first place, only apt-get update warns me about Temporary failure resolving 'foo.com', but when I try with nslookup foo.com or ping foo.com, it works fine!



                                                            My incredibly dirty hack/fix for solving this bug, is to add the resolved domains manually to /etc/hosts with this short script:



                                                            resolveAptHosts()
                                                            {
                                                            mapfile -t hosts < <(
                                                            sed -n -r '/^#/d; s;deb(-src)? (http://|ftp://)?([^/ ]+).*;3;p'
                                                            /etc/apt/sources.list | sort | uniq )
                                                            # delete all hosts from /etc/hosts, e.g., from an earlier call
                                                            sudo sed -i -r '/^[0-9]{1,3}(.[0-9]{1,3}){3}[ t]+('"$( printf '|%s'
                                                            "${hosts[@]//./\.}" | sed 's/^|//' )"')[ t]*$/d' /etc/hosts
                                                            for host in ${hosts[@]}; do
                                                            ip=$( nslookup "$host" | sed -n -r 's|Address:[ t]*([0-9.]+).*|1|p' |
                                                            tail -1 )
                                                            sudo bash -c "echo $ip $host >> /etc/hosts"
                                                            done
                                                            }


                                                            Now updating should work:



                                                            resolveAptHosts && sudo apt-get update


                                                            If anyone knows why this workaround works and how to solve this bug for real, I'll be eternally thankful. I also tried using sudo apt-get update -o Acquire::ForceIPv4=true in order to exclude IPv6 resolve problems, but that didn't help either.






                                                            share|improve this answer















                                                            The accepted solution does not work for me. In the first place, only apt-get update warns me about Temporary failure resolving 'foo.com', but when I try with nslookup foo.com or ping foo.com, it works fine!



                                                            My incredibly dirty hack/fix for solving this bug, is to add the resolved domains manually to /etc/hosts with this short script:



                                                            resolveAptHosts()
                                                            {
                                                            mapfile -t hosts < <(
                                                            sed -n -r '/^#/d; s;deb(-src)? (http://|ftp://)?([^/ ]+).*;3;p'
                                                            /etc/apt/sources.list | sort | uniq )
                                                            # delete all hosts from /etc/hosts, e.g., from an earlier call
                                                            sudo sed -i -r '/^[0-9]{1,3}(.[0-9]{1,3}){3}[ t]+('"$( printf '|%s'
                                                            "${hosts[@]//./\.}" | sed 's/^|//' )"')[ t]*$/d' /etc/hosts
                                                            for host in ${hosts[@]}; do
                                                            ip=$( nslookup "$host" | sed -n -r 's|Address:[ t]*([0-9.]+).*|1|p' |
                                                            tail -1 )
                                                            sudo bash -c "echo $ip $host >> /etc/hosts"
                                                            done
                                                            }


                                                            Now updating should work:



                                                            resolveAptHosts && sudo apt-get update


                                                            If anyone knows why this workaround works and how to solve this bug for real, I'll be eternally thankful. I also tried using sudo apt-get update -o Acquire::ForceIPv4=true in order to exclude IPv6 resolve problems, but that didn't help either.







                                                            share|improve this answer














                                                            share|improve this answer



                                                            share|improve this answer








                                                            edited Apr 25 '18 at 8:22

























                                                            answered Mar 31 '18 at 1:44









                                                            mxmlnknmxmlnkn

                                                            46346




                                                            46346























                                                                0














                                                                This issue can also be caused by a wrongly named interface. For example a Temporary failure resolving error message can be caused by an interface which is not named eth0 but is incorrectly named eml instead.






                                                                share|improve this answer




























                                                                  0














                                                                  This issue can also be caused by a wrongly named interface. For example a Temporary failure resolving error message can be caused by an interface which is not named eth0 but is incorrectly named eml instead.






                                                                  share|improve this answer


























                                                                    0












                                                                    0








                                                                    0







                                                                    This issue can also be caused by a wrongly named interface. For example a Temporary failure resolving error message can be caused by an interface which is not named eth0 but is incorrectly named eml instead.






                                                                    share|improve this answer













                                                                    This issue can also be caused by a wrongly named interface. For example a Temporary failure resolving error message can be caused by an interface which is not named eth0 but is incorrectly named eml instead.







                                                                    share|improve this answer












                                                                    share|improve this answer



                                                                    share|improve this answer










                                                                    answered Nov 6 '18 at 7:46









                                                                    karelkarel

                                                                    58.1k12128146




                                                                    58.1k12128146























                                                                        0














                                                                        I got the same issue in a vmware virtual machine, host and guest both are ubuntu.
                                                                        I solved the issue changing the setting of the virtual machine. Instead of using NAT, I set Bridged.
                                                                        It worked for me






                                                                        share|improve this answer




























                                                                          0














                                                                          I got the same issue in a vmware virtual machine, host and guest both are ubuntu.
                                                                          I solved the issue changing the setting of the virtual machine. Instead of using NAT, I set Bridged.
                                                                          It worked for me






                                                                          share|improve this answer


























                                                                            0












                                                                            0








                                                                            0







                                                                            I got the same issue in a vmware virtual machine, host and guest both are ubuntu.
                                                                            I solved the issue changing the setting of the virtual machine. Instead of using NAT, I set Bridged.
                                                                            It worked for me






                                                                            share|improve this answer













                                                                            I got the same issue in a vmware virtual machine, host and guest both are ubuntu.
                                                                            I solved the issue changing the setting of the virtual machine. Instead of using NAT, I set Bridged.
                                                                            It worked for me







                                                                            share|improve this answer












                                                                            share|improve this answer



                                                                            share|improve this answer










                                                                            answered 10 mins ago









                                                                            Jean-MarcJean-Marc

                                                                            543




                                                                            543

















                                                                                protected by Community Aug 22 '14 at 12:54



                                                                                Thank you for your interest in this question.
                                                                                Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                                                Would you like to answer one of these unanswered questions instead?



                                                                                Popular posts from this blog

                                                                                GameSpot

                                                                                connect to host localhost port 22: Connection refused

                                                                                Getting a Wifi WPA2 wifi connection