Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I accidentally removed the perl package instead of the pear from my Ubuntu server and for some reason it uninstalled many packages, like php, mysql, etc... Why is that? does those packages depend on perl?

My question is that when I uninstalled this package, mail stopped working. I installed everything again but I can't get mail to work again. I am using the PHP function.

Is there a package I need to install? If so which is it?

Many thanks

share|improve this question

migrated from Jul 4 '11 at 11:36

This question came from our site for professional and enthusiast programmers.

You need to install an MTA (Exim, Postfix, Sendmail, whatever) and to configure the relayhost and servername (at least)... it is a Serverfault question though. Hence the close vote – Eineki Jul 4 '11 at 11:24
I love questions with no code and does not work as description. They are are very stimulating for the mind. – Álvaro González Jul 4 '11 at 11:32
What's the result of echo test mail | mail my@email.address -s"test mail"? – Andy Jul 4 '11 at 11:52
@Andy: there is no result – seedg Jul 4 '11 at 12:01
@Chris try searchings the logs for your MTA for your email address (ask Google if unsure) and see if the mail even made it into the queue/attempted delivery etc - only once it works from the command line return to debugging it from PHP. – Andy Jul 4 '11 at 12:24
up vote 0 down vote accepted

Most likely, you removed the mail transport agent, too, and did not reinstall it. Try installing a package like "sendmail".

Background: the mail function just passes the mail to an underlying mail transport agent. If there is none, it will fail. Most/many/some of these mail transport agents rely on perl.

share|improve this answer
I tried reinstalling postfix but it is still not working. Any ideas? – seedg Jul 4 '11 at 11:47
Here's one: Stop assuming that everyone else here is telepathic and giving us problem reports such as "it is still not working", "I can't get mail to work", and "there is no result". Report your problems properly. – JdeBP Jul 4 '11 at 15:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.