debian apt-get troubles
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
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.
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
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:
Also, check out debfoster for getting rid of packages you don't really need.
@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