LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to update packages in debian? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-update-packages-in-debian-413905/)

g_srinivas 02-10-2006 01:52 PM

how to update packages in debian?
 
Hello,
I recently installed Debain v3.1 Sarge edition and i must tell yout hat i am new to linux world. Can you please tell me what is the proper way to update any modules or libraries?

For example in my debian linux i have libxml2 of v2.6.16-7 (i get this info when i run the command: dpkg -l | grep libxml) and now the latest available one is libxml2-2.6.23.tar.gz. So if i want to update this library then how to do it?

Thanks in advance

pljvaldez 02-10-2006 01:58 PM

Using Sarge, you're going to have a rock solid stable distro. However, you're not going to have the "latest and greatest".

If you want to have the latest and greatest, edit your /etc/apt/sources.list file and replace every "stable" with "unstable" and every "sarge" with "sid". Then type as root apt-get update && apt-get dist-upgrade. But be aware that occasionally things might break. Unstable is actually as stable as most normal distro's like Fedora or Ubuntu.

g_srinivas 02-10-2006 02:19 PM

Thanks for the quick reply, my original /etc/apt/sources.list looks like following:

Code:

#deb file:///cdrom/ sarge main

deb cdrom:[Debian GNU/Linux 3.1 r0a _Sarge_ - Official i386 Binary-1 (20050607)]/ unstable contrib main

deb http://security.debian.org/ stable/updates main contrib

and according to your reply i modified it to

Code:

#deb file:///cdrom/ sarge main

deb cdrom:[Debian GNU/Linux 3.1 r0a _sid_ - Official i386 Binary-1 (20050607)]/ unstable contrib main

deb http://security.debian.org/ unstable/updates main contrib

now when i run apt-get update i get following errors:

Code:

latitude:~# apt-get update
Err http://security.debian.org unstable/updates/main Packages
  404 Not Found [IP: 128.101.80.133 80]
Ign http://security.debian.org unstable/updates/main Release
Err http://security.debian.org unstable/updates/contrib Packages
  404 Not Found [IP: 128.101.80.133 80]
Ign http://security.debian.org unstable/updates/contrib Release
Err cdrom://[Debian GNU/Linux 3.1 r0a _sid_ - Official i386 Binary-1 (20050607)] unstable/contrib Packages
  Please use apt-cdrom to make this CD recognized by APT. apt-get update cannot be used to add new CDs
Ign cdrom://[Debian GNU/Linux 3.1 r0a _sid_ - Official i386 Binary-1 (20050607)] unstable/contrib Release
Err cdrom://[Debian GNU/Linux 3.1 r0a _sid_ - Official i386 Binary-1 (20050607)] unstable/main Packages
  Please use apt-cdrom to make this CD recognized by APT. apt-get update cannot be used to add new CDs
Ign cdrom://[Debian GNU/Linux 3.1 r0a _sid_ - Official i386 Binary-1 (20050607)] unstable/main Release
Failed to fetch cdrom:[Debian GNU/Linux 3.1 r0a _sid_ - Official i386 Binary-1 (20050607)]/dists/unstable/contrib/binary-i386/Packages.gz  Please use apt-cdrom to make this CD recognized by APT. apt-get update cannot be used to add new CDs
Failed to fetch cdrom:[Debian GNU/Linux 3.1 r0a _sid_ - Official i386 Binary-1 (20050607)]/dists/unstable/main/binary-i386/Packages.gz  Please use apt-cdrom to make this CD recognized by APT. apt-get update cannot be used to add new CDs
Failed to fetch http://security.debian.org/dists/unstable/updates/main/binary-i386/Packages.gz  404 Not Found [IP: 128.101.80.133 80]
Failed to fetch http://security.debian.org/dists/unstable/updates/contrib/binary-i386/Packages.gz  404 Not Found [IP: 128.101.80.133 80]
Reading Package Lists... Done
W: Couldn't stat source package list cdrom://[Debian GNU/Linux 3.1 r0a _sid_ - Official i386 Binary-1 (20050607)] unstable/contrib Packages (/var/lib/apt/lists/Debian%20GNU_Linux%203.1%20r0a%20%5fsid%5f%20-%20Official%20i386%20Binary-1%20(20050607)_dists_unstable_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list cdrom://[Debian GNU/Linux 3.1 r0a _sid_ - Official i386 Binary-1 (20050607)] unstable/main Packages (/var/lib/apt/lists/Debian%20GNU_Linux%203.1%20r0a%20%5fsid%5f%20-%20Official%20i386%20Binary-1%20(20050607)_dists_unstable_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://security.debian.org unstable/updates/main Packages (/var/lib/apt/lists/security.debian.org_dists_unstable_updates_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://security.debian.org unstable/updates/contrib Packages (/var/lib/apt/lists/security.debian.org_dists_unstable_updates_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list cdrom://[Debian GNU/Linux 3.1 r0a _sid_ - Official i386 Binary-1 (20050607)] unstable/contrib Packages (/var/lib/apt/lists/Debian%20GNU_Linux%203.1%20r0a%20%5fsid%5f%20-%20Official%20i386%20Binary-1%20(20050607)_dists_unstable_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list cdrom://[Debian GNU/Linux 3.1 r0a _sid_ - Official i386 Binary-1 (20050607)] unstable/main Packages (/var/lib/apt/lists/Debian%20GNU_Linux%203.1%20r0a%20%5fsid%5f%20-%20Official%20i386%20Binary-1%20(20050607)_dists_unstable_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://security.debian.org unstable/updates/main Packages (/var/lib/apt/lists/security.debian.org_dists_unstable_updates_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://security.debian.org unstable/updates/contrib Packages (/var/lib/apt/lists/security.debian.org_dists_unstable_updates_contrib_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 have been ignored, or old ones used instead.
latitude:~#

could you please tell me.. what did i do wrong here???

PMorph 02-10-2006 03:03 PM

Hi,

It's a bit different with unstable. Try this:
Code:

deb http://ftp.fi.debian.org/debian/ unstable main non-free contrib
deb-src http://ftp.fi.debian.org/debian/ unstable main non-free contrib

But replace the "ftp.fi" with the site closest to you http://www.debian.org/mirror/list

JimBass 02-10-2006 08:29 PM

There is no security updates for unstable. Not that it isn't secure, but the security team only does a little bit in testing and really works on stable, as that is the intended server version. You should comment out the security lists in sources.list, and that will make it a bit nicer. You also should take out the cdrom source, as the disk you have is stable, and you are now upgraded to unstable. Here is a copy of my sources.list:

Code:

deb http://ftp.debian.org/debian/ unstable main non-free contrib
deb-src http://ftp.debian.org/debian/ unstable main non-free contrib

deb http://ftp.us.debian.org/debian/ unstable main non-free contrib
deb-src http://ftp.us.debian.org/debian/ unstable main non-free contrib

Try replacing my sites with ones closer to you, using the mirror list that was already posted in this thread.

Peace,
JimBass

g_srinivas 02-11-2006 06:45 AM

Yes i got it worked... many thanks for the help.. pljvaldez, PMorph and JimBass.

Peace out...


All times are GMT -5. The time now is 08:04 AM.