Jump to content

Debian: How to use APT! [solved]


Recommended Posts

Well, I crossed the line.

 

For the first time since 1999, I installed a distribution other than Mandrake/iva, namely: Damn Small Linux (Debian based).

 

It installed damn small and damn well :) And I instantly launched the scripts that auto-installed GNU tools, APT, and Synaptic.

 

So now I have this nice /etc/apt/sources.list:

#deb http://ftp.us.debian.org/debian/ testing main

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

#deb http://non-us.debian.org/debian-non-US/ testing/non-US main contrib non-free

#deb-src http://non-us.debian.org/debian-non-US/ testing/non-US main contrib non-free

#deb http://www.modularity.org/knoppix ./

 

I find with google loads of pages explaining how to install Debian from CD, and how nicely structured the APT repositories are (testing vs stable..., main vs non-free...) BUT NOWHERE do I find simple commands to type in the terminal.

 

In short, what I want is to have the equivalent of the commands I get when I choose main, contrib, plf-free, and plf-nonfree for "community" and/or "cooker" in Easy-Urpmi.

 

Any help for a poor helpless newbie :lol: ?

 

Yves.

Link to comment
Share on other sites

  • Replies 46
  • Created
  • Last Reply

Top Posters In This Topic

huhuhuh.... :lol:

well, the basic commands with apt-get are

apt-get update

apt-get upgrade

apt-get install <package>

apt-get remove <package>

 

any more descriptions necessary? type apt-get --help

Link to comment
Share on other sites

There is also aptitude, synaptic ( A decent GTK GUI frontend for apt), kynaptic (a bloody mess of a QT3 frontend, works best when not installed), kpackage and some distro-specific apt frontends.

Since you are using "testing" avoid ATM like hell ANY dist-upgrade till Debian sorts the hell that was created in both testing and Sid by the insertion of Xorg in place of Xfree86. Chances to TOTALLY break your system are simply great...

Best Debian based distro is by far Kanotix (much better than Mepis, and much more flexible than "K"Ubuntu), but it's pure Sid (=really unstable, so you GOT to know what you are doing!), and also heavily affected by the Xorg hell ATM...

Edited by scarecrow
Link to comment
Share on other sites

huhuhuh.... :lol:

well, the basic commands with apt-get are

apt-get update

apt-get upgrade

apt-get install <package>

apt-get remove <package>

 

any more descriptions necessary? type apt-get --help

I read this help. It is not very explicit sometimes. So I tried. I first uncommented the testing and non-us lines (those before and after the already-there oldcurrent), then I ran apt-get update. It seems to me that this command is for updating the repository based on the last changes in sources.list. Next I did apt-get install tmdns... no luck :(

Thanks for the quick-start anyway :)

 

There is also aptitude, synaptic ( A decent GTK GUI frontend for apt), ... Since you are using "testing" avoid ATM like hell ANY dist-upgrade till Debian sorts the hell that was created in both testing and Sid by the insertion of Xorg in place of Xfree86.... heavily affected by the Xorg hell ATM...

Wow that's a lot of information!

As I said, I already use Synaptic. Not very nice-looking, but its seems to do its job. As for the dist-upgrade, I'll probably never run it then, because I'm using neither XFree86 nor XOrg: I'm using Xvesa, and I wouldn't want to loose it.

 

How do you conclude that I'm using "testing"? Is testing the equivalent of "Community" or of "Cooker"?

How do I declare debian equivalent to Cooker, Community and PLF in sources.list? I've always heard that Debian has many many more packages than Mandrake (or any distro for that matter) and now that I try, I can't install tmdns :( Where does it hide? Behind what commands?

 

Yves.

 

(While I'm at it: is there an equivalent to "service"? I just typed service network restart, and of course it did nothing :) )

Link to comment
Share on other sites

How do you conclude that I'm using "testing"? Is testing the equivalent of "Community" or of "Cooker"?

 

Quoting your previous post:

deb http://ftp.us.debian.org/debian/ testing main

Ain't that clear? :jester:

Debian has three stages, not two, as Mandriva does: Stable (Sarge), Testing (forgetting the new name, as I never used it- sorry for that...) and Unstable (Sid). You can roughly consider Stable being the analogous to "official" and "Unstable" the analogous to "Cooker"- put "testing" somewhere between these two...

BTW since you want a change, and if you aren't fearful of no-gui, try ArchLinux... you will be VERY pleasantly suprised.

BTW if you want to manually (re)start services in Debian, you must use (as root) "/etc/init.d/service (re)start - since /etc/init.d is not at the system's path. Under Arch, you have to go /etc/rc.d/service (re)start and so on... I think it's simple and clear.

Edited by scarecrow
Link to comment
Share on other sites

I'll keep DSL, thanks, and anyway, I've long wanted to discover the Debian world :)

 

So as I said, I changed my sources.list to this:

deb http://ftp.us.debian.org/debian/ testing main 
deb http://ftp.us.debian.org/debian/ oldstable main non-free contrib 
deb http://non-us.debian.org/debian-non-US/ testing/non-US main contrib non-free 
#deb-src http://non-us.debian.org/debian-non-US/ testing/non-US main contrib non-free 
#deb http://www.modularity.org/knoppix ./

(hey scarecrow: you're then able to answer on posts I do before I do them. Amazing :lol:)

But apt-get update gave me a bunch of 404 NOT FOUND, before reporting that "some sources" could not have been updated.

 

So based on the information on the Debian site, I changed to this:

deb http://ftp2.fr.debian.org/debian/ testing main
deb http://ftp2.fr.debian.org/debian/ oldstable main non-free contrib
deb http://non-us.debian.org/debian-non-US/ testing/non-US main contrib non-free

I still have some 404 NOT FOUND...

BTW, what are those "packages" that apt-get update downloads? I see a purcentage going up from 0% to 100% about things being downloaded; I suppose those are the equivalent of the hdlist.cz...

 

Now on sources: If I understand correctly, Stable (Sarge) is the equivalent of "Official" (hence is a link to latest official, whatever it is), Testing (Etch) is the equivalent of "Community edition" (also a link), and Unstable (Sid) is the equivalent of "Cooker" (a link too).

By "link", I mean the following:

In Easy-Urpmi, if I choose "Community", I get:

urpmi.addmedia main ftp://.../Mandrakelinux/devel/community/i586/media/main with media_info/hdlist.cz

If I choose "2005", I get:

urpmi.addmedia main ftp://.../Mandrakelinux/official/2005/i586/media/main with media_info/hdlist.cz

One day, both can be the same, and the next not be any more. The community source will always be community and will need updating, while the 2005 source might still exist 3 years from now, but will be obsolete. Community is a link, and 2005 is not.

 

So if Stable, Testing, and Unstable are indeed links, I just need to apt-get update to always have the latest, right? Just as I would update the officiel, community and cooker sources.

 

So how comes I still don't find the tmdns package? I know it is existing because Google lets me find bug-reports on it...

Is it because of the 404 NOT FOUND? If so, what could be the cause?

 

Yves.

Link to comment
Share on other sites

you are correct. changing the link in your mirrors from e.g.

deb http://ftp.us.debian.org/debian/ stable main

to

deb http://ftp.us.debian.org/debian/ testing main

would result in the possibility of upgrading your system. this makes distro upgrades a bit easier/faster with debian based distros as you simply have to change the link to the stable/testing/unstable mirror. the package information in the debian lists is smaller than that in mandrivas hdlist (even smaller than the yum lists if i am not mistaken here).

 

there are however some differences:

 

the stable branch is MORE than e.g. 10.1 OE. stable in debian 'means' stable. you won't get up-to-date packages but rather outdated packages. but these are very well tested and almost 100% bug-free. stable usually has a life time of about 3 years before there will be a update of the whole mirror to the next development level. think of it as a 99% bug-free mandriva 9.1.

 

the testing branch is more of what the current 10.1OE release represents. it is well tested software that can have the one or the other bug and can be a bit outdated here and there but it is stable enough for everyday use in 90% of cases. the bug-fixing will be done here until the development branch is considered stable enough (=almost bug-free and well tested with dozens of hardware) for critical servers. once it reaches that level, it will become the new "stable" branch while the old stable branch will become obsolete.

 

the unstable branch is somewhere between mandriva 2005LE and cooker. debian users test their packages with a lot of care and attention to detail before submitting them to the unstable branch. thus it is bleeding edge but a bit more stable than cooker imho (although some might disagree). once unstable is considered stable enough for every day use and has sorted out the most critical bugs, it gets transferred to the "testing" branch.

Link to comment
Share on other sites

OK, I've done my homework.

First, after reading http://lists.debian.org/debian-devel/2004/05/msg01054.html it becomes evident that tmdns is in unstable, so I'll have to put unstable at the end of my sources.list.

 

Next, I've found the following two URIs really informative:

http://ftp.us.debian.org/debian/README

http://ftp.us.debian.org/debian/doc/FAQ/

 

Finally, from the above documentation, and after reading the man pages...

http://www.die.net/doc/linux/man/man8/apt-get.8.html

http://www.die.net/doc/linux/man/man5/sources.list.5.html

 

... I've gathered that the following should be adequate sources.list(French):

# Woody (3.0):
deb ftp://ftp.fr.debian.org/debian-non-US oldstable/non-US main contrib non-free
deb ftp://ftp.fr.debian.org/debian oldstable main contrib non-free
# Sarge (3.1):
deb ftp://ftp.fr.debian.org/debian-non-US stable/non-US main contrib non-free
deb ftp://ftp.fr.debian.org/debian stable main contrib non-free
# Testing:
deb ftp://ftp.fr.debian.org/debian testing main
# Sid:
deb ftp://ftp.fr.debian.org/debian unstable main

Is that right?

I hope that tmdns will be found in unstable now... As for the 404 NOT FOUND, it could come from the recent changes in the USA law (I was not aware), making the non-us depots needless; if that's the case, I'll probably remove those from my list.

 

In DamnSmallLinux' default sources.list file, there is also:

#deb http://www.modularity.org/knoppix ./

Is it interesting?

 

Yves.

Link to comment
Share on other sites

yves, do not mix repositories! it will break your system sooner or later.

 

if you know that the app you are searching is available in the testing branch, simply download that debian package to your desktop (e.g. with wget) and install it separately.

Link to comment
Share on other sites

woody = ancient. I would remove it unless you have a specific reason to keep it.

:lol: Reason is: my laptop is older than ancient: P166MMX (DSL revealed this to me; I always thought it was a P150MMX) with 32MB RAM, and Xvesa, which I do not want to see replaced with XOrg. Is there a way to say "ok use Debian 3.1 but NEVER replace Xvesa with XFree or XOrg"?

 

(I'd like to keep both 3.0 and 3.1 in case something I want is in 3.1 and not in 3.0, or for those packages I feel it is safe to have in a newer version, as they say in the doc that a specific version can be targeted like that: "apt-get install stable/gimp" for example)

 

yves, do not mix repositories! it will break your system sooner or later.

if you know that the app you are searching is available in the testing branch, simply download that debian package to your desktop (e.g. with wget) and install it separately.

Is that so? I have two questions then:

 

1: In the doc I've read, they say that APT does handle dependencies, but does not know how to cope with individual .DEB files (only whole repositories), whereas DPKG only deals with individual files, but does not handle dependencies. So once I've got my tmdns-xxx.deb file, how do I "urpmi ./tmdns-xxx.deb" it?

 

2: In the same docs, they say that multiple repositories can be given, and that they appear in the order of preference. Yet I understand what you mean: on my mdv box, I have the Cooker sources declared, but disabled most of the time; I enable them only when I have something to get there. So is commenting (s/^/#) and uncommenting (s/^#//) the Debian sources the equivalent to the enabling/disabling in Mandriva?

 

Yves.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...