2

I removed the folder /etc/php5, after I removed the php5 package. Then I tried to install the package, but it said the folder did not exist. I looked in trash folder and couldn't find it. How do I restore the folder?

2 Answers 2

5

Is some cases the problem is related to the installation system {apt-get, dpkg} which remembers that you have deleted configuration files and make you pay for this sin forever.

Try something like:

apt-get install php5-cli php5-comon php5-cli -o Dpkg::Options::=--force-confmiss

The --force-confmiss flag is supposed to make dpkg reinstall files that where detected as deleted.

Please check out the man page for more information.

1

Lets try purging your package and reinstalling it.

sudo apt-get purge php5-common php5
sudo apt-get install php5-common php5

Try this. Note your php5 stuff might get removed and then need to be reinstalled after the fact, because php5-common is a dependency for all the other php5 stuff.

4
  • Not replacing deleted config file /etc/php5/mods-available/pdo.ini ERROR: /etc/php5/mods-available/pdo.ini does not exist
    – L.V.A
    Oct 25, 2013 at 17:47
  • 1
    @user118136 take a look at the edit, see if this works. Oct 25, 2013 at 17:49
  • php works but not work mysql and phpMyAdmin. May you help me to solve these problems?
    – L.V.A
    Oct 25, 2013 at 18:35
  • @user118136 those are separate issues and questions, post a separate question for those. Oct 25, 2013 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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