LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-12-2010, 09:30 PM   #1
collier1942
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, 09:49 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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, 02:29 AM   #3
collier1942
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 http://security.ubuntu.com/ubuntu/di...tion-en_GB.bz2 Could not resolve ‘security.ubuntu.com’
 
Old 10-13-2010, 04:36 AM   #4
longbow0
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian
Posts: 20

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

or run
Code:
ping security.ubuntu.com
to check the output.

May be it need to modify /etc/resolve.conf to configure DNS servers. e.g.,
Code:
nameserver 208.67.222.222
nameserver 208.67.220.220

Last edited by longbow0; 10-13-2010 at 04:38 AM.
 
1 members found this post helpful.
Old 10-13-2010, 08:23 PM   #5
collier1942
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.
 
  


Reply

Tags
apt



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-25-2010 11:15 PM
LXer: Apt-Cacher-NG - HTTP download proxy for software packages LXer Syndicated Linux News 0 02-24-2009 11:50 PM
apt-get trying to download wrong packages. Why? *Dark Dragon* Linux - Software 4 04-29-2005 02:01 PM
Making apt-get download unstable packages sduffy89 Debian 4 08-28-2004 01:01 PM
apt-get to download packages... mahamkali Linux - Software 3 12-11-2003 10:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:09 PM.

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