LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Updating packages through apt-get (https://www.linuxquestions.org/questions/debian-26/updating-packages-through-apt-get-375980/)

tuxuser19 10-23-2005 04:32 AM

Updating packages through apt-get
 
I would like to update my Debian 3.1 packages. I tried updating by typing in >apt-get update by changing the mirror sites in /etc/apt/sources.lst. I get an error stating:
---
Err http://http.us.debian.org main/contrib Packages
Could not connect to http.us.debian.org:80 (1.0.0.0), connection timed out
44% [Connecting to http.us.debian.org (1.0.0.0)]
---
Here is my /etc/apt/sources.lst
----
#deb file:///cdrom/ sarge main

deb cdrom:[Debian GNU/Linux 3.1 r0 _Sarge_ - i386 Binary - Linux Format DVD 70]/ unstable contrib main

deb http://security.debian.org/ sarge/updates main contrib non-free
deb http://http.us.debian.org/debian/sarge main contrib non-free



Any advise?

Dead Parrot 10-23-2005 05:00 AM

I don't think packages in Debian stable are updated -- that's what the word "stable" implies. But you should check the security updates (from security.debian.org) every now and then. Of course, you need to be able to connect to the Debian package repository if you want to install applications that are not available on the Linux Format DVD. I'd suggest that you should run "apt-setup" in order to add some other repository to sources.list besides http.us.debian.org.

If you want newer packages, you can either add a backports repository (check out http://backports.org/ ) to your sources.list, or change the "stable" entries to "testing" in sources.list and do a dist-upgrade. In both cases you'll lose the safety that the official Debian stable distribution can offer, so you should consider carefully if that's what you really want.

jlinkels 10-23-2005 10:19 AM

Try these lines in you sources.list:

(I think there is an error in the last line of your sources.list)

Code:

deb http://ftp.us.debian.org/debian/ testing main non-free contrib
deb http://security.debian.org/ testing/updates main contrib non-free

SInce you were using Sarge before, and want to do some updates, I guess you should use "testing" now. It is quite safe, BUT some packages have changed from the time that Sarge and Testing were the same.

(I had this problem on some of my machines, and I did a "apt-get dist-upgrade" succesfully. However, use at you own risk.)

Tuxuse19 is right is stating that Sarge as such became stable, and is not updated anymore.

jlinkels

Bremsstrahlung 10-23-2005 03:37 PM

I'm no expert, but I there also tend to be hickups if you try to draw from more than one distro at once.

Quote:

deb cdrom:[Debian GNU/Linux 3.1 r0 _Sarge_ - i386 Binary - Linux Format DVD 70]/ unstable contrib main
It could be possible that you're trying to update unstable packages with the Sarge database, which just wouldn't work. I'd overhaul your sources.list file so they're all pointing to the same distro ("testing" the best to use, in my opinion) and then try an upgrade.. though if you already had some kind of "unstable" installed, unless it's really old and back when Sarge was "unstable," downgrading is nearly impossible and I'd either go with all unstable or reinstall Debian with "testing" in mind.

Again, I'm no expert, but this is what I THINK the situation is...

Tons of Fun 10-24-2005 09:59 AM

Unless you are updating from CD-Roms, you should comment out the deb cdrom line:

#deb cdrom:[Debian GNU/Linux 3.1 r0 _Sarge_ - i386 Binary - Linux Format DVD 70]/ unstable contrib main

That might help out as well.

Good Luck

:study:

tuxuser19 10-24-2005 10:44 AM

Actually i figured it out i have some DNS problem. I got this following command statement from one of the user forums:

echo -e "nameserver 4.2.2.1\nnameserver 168.126.63.1\n">/etc/resolv.conf

After typing the above command at console the updation works fine with out any hassle. But, i have to do it every time i update...even if i want to connect GAIM to thenet!!!

I dont know whats the problem can any one tell me whats the problem ?? Is there any other way that I can resolve this issue with out typing the command each & every time!!!

Thanks for all u guys for all the help & support :)

Dead Parrot 10-24-2005 02:17 PM

There's an utility called "resolvconf" and installing it (aptitude install resolvconf) might solve your problem. If it doesn't help, please post the output of the following commands ("su" to become root before doing them):

# cat /etc/debian_version
# ifconfig
# ifconfig -a
# cat /etc/network/interfaces
# cat /etc/resolv.conf

This should give us enough information to be able to offer you some further suggestions.

tuxuser19 10-26-2005 07:02 AM

Interestingly I have changed my /etc/resolv.conf file by adding "nameserver 4.2.2.1" statement. Now eveything works. Can any one please tell me why did it work?

Thankx all of you who helped me out :)

dastrike 10-26-2005 10:30 AM

Quote:

Originally posted by tuxuser19
Interestingly I have changed my /etc/resolv.conf file by adding "nameserver 4.2.2.1" statement. Now eveything works. Can any one please tell me why did it work?

Thankx all of you who helped me out :)

4.2.2.1 is the IP address of a well-known DNS server. I don't know exactly why in some cases some addresses resolv to 1.0.0.0, I have seen that happen on my father's computer, but not any other that I run Debian on.

Even if not changing the nameserver manually, I can get it to temporarily get sane address resolution by performing a host first.
e.g.
$ host ftp.se.debian.org
and then perform the apt-get install or whatever.

And also the /etc/resolv.conf gets overwritten all the time too, I think that has to do with DHCP.


All times are GMT -5. The time now is 03:43 PM.