Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-12-2010, 10:30 PM   #1
LQ Newbie
Registered: Aug 2009
Posts: 5

Rep: Reputation: 0
Cannot download packages with apt

I have a new installation of Ubuntu 9.10 karmic, but apt-get update gives error messages "Failed to fetch....; Could not resolve..." for all the packages in the sources.list file. The computer is talking to the network and the webserver is working. I can ping external websites. Is there a setting that must be changed to make downloads function?
Old 10-12-2010, 10:49 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,845

Rep: Reputation: 342Reputation: 342Reputation: 342Reputation: 342
Take a look at file /etc/apt/sources.list. It lists the repositories for Ubuntu. It lists both the binary and the source code files. Unless you have a need to compile source code yourself, you don't need the sources. So, comment out the lines that refer to source code repositories and the error messages should go away.

Then run apt-get update again. When the update finishes, run apt-get upgrade to get and install the upgrades for your installed software.

The advice given above assumes that Ubuntu still supports version 9.10.
1 members found this post helpful.
Old 10-13-2010, 03:29 AM   #3
LQ Newbie
Registered: Aug 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for suggestion. Have commented out the source files, but still get messages like this when I use apt-get update:

W: Failed to fetch Could not resolve ‚€˜‚€™
Old 10-13-2010, 05:36 AM   #4
LQ Newbie
Registered: Jul 2005
Distribution: Debian
Posts: 20

Rep: Reputation: 2
Did the web browser work fine?

or run
to check the output.

May be it need to modify /etc/resolve.conf to configure DNS servers. e.g.,

Last edited by longbow0; 10-13-2010 at 05:38 AM.
1 members found this post helpful.
Old 10-13-2010, 09:23 PM   #5
LQ Newbie
Registered: Aug 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks a million longbow0 you have put me on the right track. There is no /etc/resolve.conf file - but there is a /etc/resolv.conf of zero bytes. When I modify with the nameserver addresses, the system starts downloading packages like crazy. A appreciate your help greatly.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Download packages with apt but don't install them yb99 Linux - General 5 02-26-2010 12:15 AM
LXer: Apt-Cacher-NG - HTTP download proxy for software packages LXer Syndicated Linux News 0 02-25-2009 12:50 AM
apt-get trying to download wrong packages. Why? *Dark Dragon* Linux - Software 4 04-29-2005 03:01 PM
Making apt-get download unstable packages sduffy89 Debian 4 08-28-2004 02:01 PM
apt-get to download packages... mahamkali Linux - Software 3 12-11-2003 11:25 AM

All times are GMT -5. The time now is 10:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration