debian apt-get troubles

I love debian but I really hate apt-get. Sometimes I just choose centOS since I like yum a lot more. I'm trying to install the httpd and mysql development packages for debian. With yum all I have to do is yum install httpd-devel mysql-devel and it's done. I can't find the equivalent for apt-get.

Also, it seems apt-get installs useless packages sometimes. I did apt-get mysql and exim was one of the dependencies it seems. I don't understand why it would be, yum seems to only install what's needed. Is there a reason for that?

7 Replies

I'd spent a lot of time with CentOS but I've been converting to Ubuntu because I was tired of the need for third-party repos. I did have some previous experience with Debian.

Some packages are "meta" packages that include other packages that go together beyond just dependencies. Your system may also be configured to pull in suggested packages which might include a mail system, and exim is the default. But if you installed postfix first, exim would not have been installed because an equivalent package would already be there to use.

In Debian, httpd is apache2, which might help in your apt-cache search results.

How can you love Debian if you hate apt-get?

As phvt said, package names are different between CentOS and Debian. In Debian, many packages with simple names (such as mysql and php5) are actually metapackages, or pseudo-packages. Some of them are there simply for backwards compatibility, while others come with everything that somebody thought would be nice to put together. And don't even get me started on tasksel, it sucks big time.

If apt-cache search is too verbose for your SSH screen, you can go to http://packages.debian.org and search there.

I used to be a Redhat user back before the Fedora/RHEL schism. I've also tried Mandrake, but I've now settled into and fell in love with Debian. I wouldn't use apt-get though: use aptitude.

Aptitude has a commandline interface similar to apt-get, but if you want a slightly nicer experience you can try the curses interface by simply typing 'aptitude.' Of course, the UI isn't where it shines most. Aptitude takes care of dependencies with more advanced algorithms than does apt-get. Here's a good if slightly lengthy introduction:

http://algebraicthunk.net/~dburrows/pro … de/doc/en/">http://algebraicthunk.net/~dburrows/projects/aptitude/doc/en/

Also, check out debfoster for getting rid of packages you don't really need.

Thanks for the replies. As yum has a pattern for getting development stuff (such as httpd-devel, openssl-devel, etc), does apt-get or aptitude have such a convention?

Sure, -dev, e.g.:

http://packages.debian.org/en/sid/apache2-dev

@sneaks:

Also, it seems apt-get installs useless packages sometimes. I did apt-get mysql and exim was one of the dependencies it seems. I don't understand why it would be, yum seems to only install what's needed. Is there a reason for that?

You don't mention the exact package name you installed ("mysql" does not exist) and you do not mention the Debian version you are running. Therefore the following assumes you installed "mysql-server-5.0" on Debian 4.0.

apt-cache show mysql-server-5.0

reveals that MySQL recommends (does not depend on) "mailx".

apt-cache show mailx

reveals that mailx depends on exim4 or mail-transport-agent.

Two things - you seem to be automatically installing recommended packages and not just dependencies. If you are actually using apt-get, I was unaware that that was an option, and it's certainly not the default. Did you add the mailx package to your command line manually? If you are actually using aptitude (as you should be) (you need to say this), then installing Recommended packages is an option and is the default, and is easily turned off in the config file.

Second, instead of exim you can install anything that provides the virtual package mail-transport-agent, such as postfix, before the mysql install or at the same time. Then it will pull postfix and not exim4.

HTH

Thanks for the replies. I'm using apt-get with Debian 5.0, but I have installed and started using aptitude as suggested. If what you say is true then that would make sense (about the recommended packages being installed) and yes, they were being installed automatically.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct