6

I am having some problems when running apt-get update:

W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/raring/Release.gpg
Something wicked happened resolving 'br.archive.ubuntu.com:http' (-11 - System error)
E: Some index files failed to download. 
They have been ignored, or old ones used instead.

Also, when I try to push something to GitHub I receive this error:

error: Couldn't resolve host 'github.com' 
while accessing https://github.com/lapl/HardL1.git/info/refs?service=git-receive-pack
fatal: HTTP request failed

When I am at University it works fine. Any help on fixing this?

3
  • 1
    Welcome to Ask Ubuntu! You seem to have DNS issues on the network you are on. DNS is the protocol to resolve names to IP addresses. Try changing them in your system or router configuration. Maybe the ones from your ISP aren't working properly at this moment. You can use Google Public DNS (8.8.8.8) to test it quickly if that solves the issue.
    – gertvdijk
    Jun 20, 2013 at 14:46
  • @gertvdijk thanks for your help. I did what you said and everything appears to be working fine :)
    – Lucas Lima
    Jun 20, 2013 at 15:15
  • The root issue is DNS. Check for useful response (or error codes) when you run: dig archive.ubuntu.com
    – david6
    Jul 31, 2013 at 22:15

1 Answer 1

4

Configure your network to use another name server (DNS server) as the current one is failing to resolve the hostnames. Typically your home router has configured a DNS server which it uses to relay the DNS queries to. I can recommend using Google Public DNS services (8.8.8.8 and 8.8.4.4) to check out.

Preferably, try to change this setting in your router. If this fails, try setting it on a host-basis. I've described this earlier in another answer (an excerpt below).

I would recommend configuring your PC properly using Network Manager. I'm assuming you're using DHCP on your network here (most common). Then do this to perform the same as equivalent to the command you were using:

  1. Open Edit connections:

    enter image description here

  2. Edit the connection profile you're using.

    enter image description here

  3. On the IPv4 Settings tab:

    • Method: Automatic (DHCP) addresses only

      This setting makes it doing a regular DHCP request for IP address configuration of your host, but it will ignore other non-mandatory options like DNS servers suggested.

    • DNS Servers: 8.8.8.8
    • Hit Save

    enter image description here

Done.

1
  • Hi is there a way to to it via command line? Jul 24, 2014 at 12:24

You must log in to answer this question.

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