Add repositories to Eee PCs: 'couldn't stat source package list'

Q I have only been using Linux for a week or two but need to tweak a number of Eee PCs. I followed a tutorial to add a repository but it didn't seem to work. Did I do something wrong? If I browse to the websites the directory structure does not seem to fit the lines in sources.list. I added this line to sources.list:

deb http://xnv4.xandros.com/xs2.0/upkg-srv2 etch main contrib non-free

then I got several messages like the following after doing sudo apt-get update:

Failed to fetch http://update.eeepc.asus.com/p701/dists/p701/Release.gpg
Could not resolve 'update.eeepc.asus.com'
Failed to fetch http://xnv4.xandros.com/xs2.0/upkg-srv2/dists/etch/Release.gpg
Could not resolve 'xnv4.xandros.com'
Reading package lists... Done
W:Couldn't stat source package list http://update.eeepc.asus.com p701/main Packages
(/var/lib/apt/lists/update.eeepc.asus.com_p701_en_dists_p701_main_binary-i386_Packages)
- stat (2 No such file or directory)
W:Couldn't stat source package list http://xnv4.xandros.com etch/main Packages
(/var/lib/apt/lists/xnv4.xandros.com_xs2.0_upkg-srv2_dists_etch_main_binary-i386_Packages)
- stat (2 No such file or directory)
W:You may want to run apt-get update to correct these problems
E: Some index files failed to download, they may have been ignored, or old ones used instead.

A The errors you saw relate to all repositories in sources.list, not just the Xandros one you added. It appears that your Eee is unable to connect to any of the repositories, which means that you either have no internet connection or your firewall is blocking access to asus.com and xandros.com. Are you able to browse the sites from the Eee? If so, this could be a proxy setting somewhere. If your network requires you to set a proxy server in the web browser, you need to set it up in /etc/apt/apt.conf by adding this line (obviously using the correct address and port for your proxy server)

Acquire::http::Proxy "http://proxy.server.address:port";

You can also use the following syntax; both do the same job, so use whichever you prefer.

Acquire {
HTTP {
Proxy "http://proxy.server.address:port";
};
};

It may also be a good idea to set the http_proxy environment variable, which you will need to do if you ever want to download files with Curl or Wget. While you may not be aware that you are using them, a number of programs make use of these for file downloading. You can set the variable by adding this line to /etc/profile

export http_proxy="http://proxy.server.address:port"

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar