TurnKey Linux Virtual Appliance Library

Fix for apt-get: Could not resolve 'archive.ubuntu.com'

Recently APT-GET started having problems resolving archive.ubuntu.com to install packages.

The fix is easy:

1) Add this to the end of file /etc/hosts

91.189.88.46    archive.ubuntu.com
91.189.88.46    security.ubuntu.com

2) Restart network from the command line: 

#/etc/init.d/networking restart
Liraz Siri's picture

If you use a reliable nameserver you won't have to hardwire IPs

If Ubuntu ever move the server to another address those IP addresses will be broken so its best to solve this problem by using a reliable DNS server, like Google's:
nameserver 8.8.8.8
nameserver 8.8.4.4
You can configure the nameserver in the configuration console if you configure your address with a static IP. You can also add it to /etc/resolv.conf but if you later use the configuration console those changes might get overwritten.

Proper Nameservers

Hi all,

  Liraz Siri's comment is important.  I had same problem, and the original solution worked (kudos and thanks to vanarie).

However, the root of the problem was not the network of my server, but the fact that my VPN client had overwritten resolv.conf

Adding proper nameservers like Liraz mentioned solved the root of the problem.

 

cheers,

JP

he thanks for the fix you

he thanks for the fix you doing fine .how eo you do that?

Problem is in /etc/nsswitch.conf

I fix this problem changing the order in the file /etc/nsswitch.conf, line host. Put the option dns in the beginning ( I put after files ).

hosts:          files dns wins mdns4_minimal [NOTFOUND=return] mdns4

Thanks

Helder

Thanks

Hi vanarie

Thanks for your inputs. It helped me fix the same problem in virtualbox setup having ubuntu guest OS.

/Br

Girish S

problem installing updates

just installed ubuntu lots of problems have to reboot machine several times to get to desktop and when i finally do and download updates it will only install 40% and stops at configuring hpijs tired of messing with it any help befor i strip it off my machine and find something else

Jeremy's picture

When you say you're installing Ubuntu...

Do you mean one of the Ubuntu based Turnkey Linux appliances? If not you're not in the right place... I suggest that you try the Ubuntu forums (or at least start a new forum thread in the 'general' section because it doesn't apply to this thread). TKL appliances don't have a desktop (they are server appliances).

If you do mean TKL then you need to supply a bit more info. perhaps post some screenshots of something.

Thanks ..

thank you . you saved me a lot of time .... :) cheers ..

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)