Problems with apt-get update (-11 -System error) and GitHub

6,052

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.

Share:
6,052

Related videos on Youtube

Lucas Lima
Author by

Lucas Lima

Updated on September 18, 2022

Comments

  • Lucas Lima
    Lucas Lima over 1 year

    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?

    • gertvdijk
      gertvdijk almost 11 years
      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.
    • Lucas Lima
      Lucas Lima almost 11 years
      @gertvdijk thanks for your help. I did what you said and everything appears to be working fine :)
    • david6
      david6 over 10 years
      The root issue is DNS. Check for useful response (or error codes) when you run: dig archive.ubuntu.com
  • user3019105
    user3019105 almost 10 years
    Hi is there a way to to it via command line?