Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
    
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 '13 at 17:47
1  
@user118136 take a look at the edit, see if this works. – Thomas W. Oct 25 '13 at 17:49
    
php works but not work mysql and phpMyAdmin. May you help me to solve these problems? – L.V.A Oct 25 '13 at 18:35
    
@user118136 those are separate issues and questions, post a separate question for those. – Thomas W. Oct 25 '13 at 20:53

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.

share|improve this answer

Your Answer

 
discard

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.