Problem with removing postfix
For some reason why I try to remove postfix, apt-get wants to remove the mysql-server package as well. Anybody know why this is? I use mysql-server so I can not afford to remove it. Seems odd that an MTA wants to remove a database package. I do not have postfix-mysql installed btw:
root@g [/etc]# apt-get --purge remove postfix
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
maildrop* (1.5.3-1.1sarge1)
mailx* (8.1.2-0.20040524cvs-4)
mysql-server* (4.0.24-10sarge1)
postfix* (2.1.5-9)
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 11.7MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
root@g [/etc]# dpkg -l 'mysql-server'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii mysql-server 4.0.24-10sarge mysql database server binaries
root@g [/etc]# dpkg -l '*postfix*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=================-=================-========================================
ii postfix 2.1.5-9 A high-performance mail transport agent
un postfix-doc <none> (no description available)
un postfix-ldap <none> (no description available)
un postfix-mysql <none> (no description available)
un postfix-pcre <none> (no description available)
un postfix-pgsql <none> (no description available)
un postfix-tls <none> (no description available)</none></none></none></none></none></none>
Any ideas?
6 Replies
@Jay:
apt-get install mysql-server
THEN do the postfix stuff.
My fault, I should have posted in my original post that mysql-server IS installed.
root@g [/etc]# dpkg -l 'mysql-server'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii mysql-server 4.0.24-10sarge mysql database server binaries
And on a side note, you can't remove a package unless it's installed, therefore apt-get can't remove mysql-server unless it is installed. So although implied, mysql-server is installed
I believe what he was driving at is that if you tell the system you specifically want mysql-server, it won't automatically remove it.
more surprising thing is that attempting to remove postfix doesn't cause a lot more fallout - an MTA is pretty much required to run Debian.
Trying using 'dpkg –remove postfix', it won't try to remove anything else automatically, but will complain about all the things you'll break with this removal.
@Xan:
I believe what he was driving at is that if you tell the system you specifically want mysql-server, it won't automatically remove it. How do you tell the system I specifically want to keep mysql-server?````
root@g [/etc]# apt-get install mysql-server
Reading Package Lists… Done
Building Dependency Tree… Done
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
````
SteveG - Ahh, I think I understand what you mean now. For example mysql-server will occasionally check for corrupt tables (I think on daemon restart), and if it finds any, it emails me. Now that I think about it, it must be using postfix or mailx to send those mails. Now that makes sense as to why mysql-server depends on mailx and postfix. I also see your point about other things not depending on it, like apache2 or crond for example.
Well I have installed a different MailServer, although it is 3rd party software, not a standard mta such as postfix or exim. Does anybody know how to configure mysql-server to use a sendmail binary, or specifically tell it not to use postfix.
Edit: I did some more searching, and SteveG was exactly correct: > Of course it should be removed. The 'mysql-server' package depends on 'mailx', which depends on 'mail-transfer-agent'. You removed Exim, which provides 'mail-transport-agent', but did not provide a replacement, so the only thing to do was to remove 'mailx', which meant that 'mysql-server' had to go too.
The fix, of course, is to install something else that provides 'mail-transfer-agent'.
Now my question is how can I make it so that my 3rd party mail server program 'provides' the mail-transfer-agent dependency?
If it is not in apt, you'll probably need to set up a 'stub' package to keep apt quiet about that kind of thing. (Meaning, you install it from sources but tell apt "pretend this is a real Debian package called xxx and provides yyy, and note it.")
The second approach will require: