I uninstalled php5 from my computer with command
sudo apt-get -y purge php.*
running this command will show me this message in terminal:
Errors were encountered while processing:
php5-memcache
php5-memcached
So I tried to uninstall memcache:
sudo apt-get remove php-memcache
It showed me message, that it cannot find memcache package:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php-memcache
and then memcached:
apt-get remove php5-memcached
It throws me information about missing dependencies in php:
The following packages have unmet dependencies.
php5-memcache : Depends: php5-common (>= 4.3.11) but it is not going to be installed
Depends: php-pear (>= 1.4.0~b1) but it is not going to be installed
Depends: phpapi-20121212
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Running
apt-get -f install
throws me errors about removing memcache, again.
As I understand correctly, I made mistake, that I didn't remove memcache before I uninstalled php5? What can I do now? Do I need to install php again? When I try to install missing dependencies, I get message about another missing packages. Should not be missing packages automatically added/removed, when using "apt-get"?
By googling I found, that problem can be by using wrong repositories, which are not suitable for my system. How can I detect, which repositories are the right for my system to install/unistall appropriate packages for uninstalling memcache? thanks for any help
I have such php repositories added to my system: http://ppa.launchpad.net/ondrej/php5/ubuntu http://ppa.launchpad.net/ondrej/php5/ubuntu http://ppa.launchpad.net/ondrej/php-7.0/ubuntu http://ppa.launchpad.net/ondrej/php-7.0/ubuntu
I tried to remove memcache with dpkg according @oerdnj but I got still some errors:
tomas@Toshiba ~ $ sudo dpkg --purge php5-memcache
(Reading database ... 275094 files and directories currently installed.)
Removing php5-memcache (3.0.8-4build1) ...
/var/lib/dpkg/info/php5-memcache.prerm: 9: /var/lib/dpkg/info/php5- memcache.prerm: php5dismod: not found
dpkg: error processing package php5-memcache (--purge):
subprocess installed pre-removal script returned error exit status 127
Errors were encountered while processing:
php5-memcache
I also tried solution from thread How to remove/install a package that is not fully installed? but it shows me the same errors:
tomas@Toshiba ~ $ sudo apt-get install --reinstall dpkg
[sudo] password for tomas:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
php5-memcache : Depends: php5-common (>= 4.3.11) but it is not going to be installed
Depends: php-pear (>= 1.4.0~b1) but it is not going to be installed
Depends: phpapi-20121212
php5-memcached : Depends: libmemcached10 but it is not going to be installed
Depends: php5-common (>= 5.2.0) but it is not going to be installed
Depends: php5-common (< 6.0.0) but it is not going to be installed
Depends: php-pear (>= 1.4.0~b1) but it is not going to be installed
Depends: phpapi-20121212
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).