apt sources.list syntax

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Aug 22 13:55:54 UTC 2007


On Tue, Aug 21, 2007 at 08:15:29PM -0400, KEITH MASTIN wrote:
> Hey all;
> Just recently installed my first debian distro (4.0), and I can't quite get the sources.list syntax down so that apt-get update doesn't barf.
> 
> I've read the mans, checked the bible (v. 3.1) and looked through about as much of the debian mailing list archives as I could before going totally brain-dead, and well, I'm still scratching my head over this and hoping someone out there could shed some light on the situation for me.
> 
> Here's my sources.list:
> quote
> #
> # deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20070407-11:29]/ etch contrib main
> 
> deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20070407-11:29]/ etch contrib main
> 
> deb http://debian.yorku.ca/debian/ etch main
> deb-src http://debian.yorku.ca/debian/ etch main
> 
> deb http://security.debian.org/ etch/updates main contrib
> deb-src http://security.debian.org/ etch/updates main contrib
> 
> deb  http://packages.debian.org/unstable/libs/
> unquote
> 
> The last line is the one I'm trying to add by hand., to get some sun-java jre and jdk thingys from http://packages.debian.org/unstable/libs/
> 
> The last few lines of output after running apt-get update:
> 
> quote
> Ign http://packages.debian.org etch/unstable Packages
> Err http://packages.debian.org etch/unstable Packages
>   404 Not Found
> Fetched 2B in 1s (2B/s)
> Failed to fetch http://packages.debian.org/dists/etch/unstable/binary-i386/Packages.gz  404 Not Found

packages.debian.org is NOT a package archive.  You can't use that as a
package source.

If you want some parts of unstable, you have to add something like:
deb http://debian.yorku.ca/debian/ unstable main

Then since that will make it upgrade the whole system to unstable, you
add something like:

/etc/apt/apt.conf.d/01default:
APT::Default-Release "stable";

You can then upgrade normally since it will prefer things from stable.

If you want a package from unstable you can do:
apt-get install packagename/unstable

It will then tag that package to come from unstable and keep upgrading
it from unstable.  You can also do:
apt-get -t unstable install packagename

That will install the package and all dependancies from unstable and tag
them all as such to continue upgrading those from unstable.

Mixing and matching often doesn't work though, and may in fact already
be imposible between etch and testing/unstable due to the major change
in libc version, and if you upgrade libc on stable then you are very
much not running stable anymore and would be better off moving to
testing entirely.

Of course if all you want is java stuff you should be able to install
sun's java packages directly from the debian archive.  You just have to
add 'contrib non-free' after 'main' to your original deb line.  Java
isn't "free" so it goes in "non-free" which you have to tell it you want
to use.  Then you can install sun-java5-jre or sun-java5-jdk, etc.

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list