[svlug] Proper use of apt-get/sources.list file

Rick Moen rick at linuxmafia.com
Tue Dec 21 21:33:47 PST 2004


Quoting Skip Evans (skip at venomouspenguin.com):

[/etc/apt/sources.list contains only this line:]

> deb http://xnv2.xandros.com/2.0/pkg xandros2.0-xn main contrib non-free

> My issue, though, is that with this one entry, apt-get is unable to
> find the packages I wish to install, like gaim, gftp and a few others.

I just retrieved and examined
http://xn1.xandros.com/2.0/pkg/dists/xandros2.0-xn/main/binary-i386/Packages.gz,
http://xn1.xandros.com/2.0/pkg/dists/xandros2.0-xn/contrib/binary-i386/Packages.gz, and 
http://xn1.xandros.com/2.0/pkg/dists/xandros2.0-xn/non-free/binary-i386/Packages.gz,
whose use is implied by your sources.list line, above:  None contains
any entry for packages named gaim or gftp.  The obvious inference is
that the cited repository, as described by you, _doesn't include_
packages by those names.  Which would suffice to explain why "apt-get is
unable to find" them (a phrase to which I'll return, below).

> I have, in the past, messed up bad by not really understanding
> apt-get, and changed the sources.list entry rather arbitrarily, thus
> getting myself into trouble. I think it was this sloppy mod to
> sources.list that caused even updates to fail.

So, I guess you'd better ask Xandros Technical Support what your
/etc/apt/sources.list _should_ contain, for a Xandros Desktop OS 2.0 box.

> What is the proper procedure for changing this file?

Well, for one thing, comment out lines you think you don't want using
the "#" character to preface those lines, rather than just deleting
them.  For that matter, in your shoes, I'd have done this before fooling
around with the file at all:

# cd /etc/apt
# cp sources.list sources.list-KNOWN-GOOD

Second, you can add to it only at your peril new lines that may not be
compatible with your particular release of your particular distribution.


Also, meaning no personal criticism, but in the future it would be a
good idea if you would _show_ us what you're doing on your system,
rather than simply telling us.  E.g., include the actual command-line
transcript of what you're doing, and the literal contents of relevant
text files such as /etc/apt/sources.list (or portions thereof).  Give us
the raw data, not just your interpretations.

When you're precise in your problem description (in those ways and
others), you're more likely to get effective help.  Knowing that, and
having too many unfortunate experiences, by contrast, with people who
were vague in such descriptions, expert users are more likely to help
you.  Just a thought.

When in doubt, the /usr/bin/script utility is useful for generating
transcripts of shell sessions.  You can then remove less-relevant
portions in your text editor, and include the rest in your help request.

For example, you said "apt-get isn't able to find" a couple of named
packages.  That's a perfect example of telling us rather than showing
us.  The techies you're seeking assistance from will tend to do a _lot_
better with access to the raw data that shows your symptoms, and for
reasons cited will be more likely to try helping you.

Instead of giving us a narrative about what happened, you could have
cut-and-pasted the relevant portion of your command session directly
into your e-mail.  I really do recommend such things in the future.

-- 
Cheers,               My grandparents went to a planet with no bilateral
Rick Moen             symmetry, and all I got was this lousy F-shirt.
rick at linuxmafia.com   




More information about the svlug mailing list