LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot download packages with apt (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-download-packages-with-apt-837690/)

collier1942 10-12-2010 09:30 PM

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?

bigrigdriver 10-12-2010 09:49 PM

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.

collier1942 10-13-2010 02:29 AM

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’

longbow0 10-13-2010 04:36 AM

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


collier1942 10-13-2010 08:23 PM

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.


All times are GMT -5. The time now is 02:16 AM.