Kali Linux dpkg error: php8.2 package is not configured yet - php

I am trying to install anything but only sudo apt update runs without problems. I tried to disable and purge PHP 8.2 without success. I tried to remove, but the same error returns and I am unable to install. Trying to configure -a as a command return the error below:
sudo dpkg --configure -a 100 ⨯
Setting up php8.2-common (8.2.1-1) ...
dpkg: error processing package php8.2-common (--configure):
installed php8.2-common package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of php8.2-mysql:
php8.2-mysql depends on php8.2-common (= 8.2.1-1); however:
Package php8.2-common is not configured yet.
dpkg: error processing package php8.2-mysql (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php8.2-opcache:
php8.2-opcache depends on php8.2-common (= 8.2.1-1); however:
Package php8.2-common is not configured yet.
dpkg: error processing package php8.2-opcache (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php8.2-readline:
php8.2-readline depends on php8.2-common (= 8.2.1-1); however:
Package php8.2-common is not configured yet.
dpkg: error processing package php8.2-readline (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libapache2-mod-php8.2:
libapache2-mod-php8.2 depends on php8.2-common (= 8.2.1-1); however:
Package php8.2-common is not configured yet.
libapache2-mod-php8.2 depends on php8.2-opcache; however:
Package php8.2-opcache is not configured yet.
dpkg: error processing package libapache2-mod-php8.2 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libapache2-mod-php:
libapache2-mod-php depends on libapache2-mod-php8.2; however:
Package libapache2-mod-php8.2 is not configured yet.
dpkg: error processing package libapache2-mod-php (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php8.2-cli:
php8.2-cli depends on php8.2-common (= 8.2.1-1); however:
Package php8.2-common is not configured yet.
php8.2-cli depends on php8.2-opcache; however:
Package php8.2-opcache is not configured yet.
php8.2-cli depends on php8.2-readline; however:
Package php8.2-readline is not configured yet.
dpkg: error processing package php8.2-cli (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php-mysql:
php-mysql depends on php8.2-mysql; however:
Package php8.2-mysql is not configured yet.
dpkg: error processing package php-mysql (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
php8.2-common
php8.2-mysql
php8.2-opcache
php8.2-readline
libapache2-mod-php8.2
libapache2-mod-php
php8.2-cli
php-mysql
I tried to use every solution on the internet, including the steps to remove dpkg. Without success.
I tried to return to factory configuration, too, in order to see if something could change, without success. The same error returns if I try not only uninstall, or install

Related

Why is showes error processing package mysql-server-8.0 (--configure)?

I'm new at PHP Laravel and I'm setting up Laravel by downloading the packages and Xampp in Lubuntu. When I download mysql by runing the command: sudo apt install mysql-server it shows me an error:
^[ORdpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-8.0; however:
Package mysql-server-8.0 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for systemd (245.4-4ubuntu3.11) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Errors were encountered while processing:
mysql-server-8.0
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have also tried to remove the mysql, upgrade and update sudo apt install and to install it again but still shows the same error.
Hope to help you
sudo apt-get clean
sudo apt-get purge 'mysql*'
sudo apt-get update
sudo apt-get install -f
sudo apt-get install mysql-server-8.0
sudo apt-get dist-upgrade

Install php7.2-xml on nginx without apache

I am trying to install php7.2-xml for my LEMP with nginx but the problem of libapache2-mod-php7.2 is appearing. Strange that it is connected to apache while I use no apache but nginx. Anyway I cannot install the extension. How to install php7.2-xml?
mann#debian:~/Dropbox/deploy$ sudo apt-get install php7.2-xml
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.2-xml is already the newest version (7.2.8-2).
The following packages were automatically installed and are no longer required:
libargon2-0 libc-ares2 libhttp-parser2.7.1 libuv1 nodejs-doc
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1571 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up libapache2-mod-php7.2 (7.2.8-2) ...
dpkg: error processing package libapache2-mod-php7.2 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
libapache2-mod-php7.2
E: Sub-process /usr/bin/dpkg returned an error code (1)
mann#debian:~/Dropbox/deploy$

PHP7.2 install on Debian 9 (stretch) fails during package configuration

I hope I'm in the right place.
I'm running a fresh Debian 9 (stretch) system. I'm trying to install PHP7.2 (from Ondřej Surý repository). I did the requisite sudo apt-get update before beginning. I then followed the instructions on Christopher Shaw's site:
sudo apt-get install apt-transport-https lsb-release ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
I then did another sudo apt-get update After that, I proceeded to the meat of things: sudo apt-get install php7.2 Then the problems started. Here's the output:
(( -- successful stuff snipped -- ))
Processing triggers for man-db (2.7.6.1-2) ...
Setting up php7.2-common (7.2.7-1+0~20180622080745.23+stretch~1.gbpfd8e2e) ...
touch: cannot touch '/var/lib/php/modules/7.2/apache2/enabled_by_maint/calendar': No such file or directory
dpkg: error processing package php7.2-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php7.2-readline:
php7.2-readline depends on php7.2-common (= 7.2.7-1+0~20180622080745.23+stretch~1.gbpfd8e2e); however:
Package php7.2-common is not configured yet.
dpkg: error processing package php7.2-readline (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.2:
php7.2 depends on php7.2-common; however:
Package php7.2-common is not configured yet.
dpkg: error processing package php7.2 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.2-cli:
php7.2-cli depends on php7.2-common (= 7.2.7-1+0~20180622080745.23+stretch~1.gbpfd8e2e); however:
Package php7.2-common is not configured yet.
php7.2-cli depends on php7.2-readline; however:
Package php7.2-readline is not configured yet.
dpkg: error processing package php7.2-cli (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.2-json:
php7.2-json depends on php7.2-common (= 7.2.7-1+0~20180622080745.23+stretch~1.gbpfd8e2e); however:
Package php7.2-common is not configured yet.
dpkg: error processing package php7.2-json (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libapache2-mod-php7.2:
libapache2-mod-php7.2 depends on php7.2-cli; however:
Package php7.2-cli is not configured yet.
libapache2-mod-php7.2 depends on php7.2-common (= 7.2.7-1+0~20180622080745.23+stretch~1.gbpfd8e2e); however:
Package php7.2-common is not configured yet.
libapache2-mod-php7.2 depends on php7.2-json; however:
Package php7.2-json is not configured yet.
dpkg: error processing package libapache2-mod-php7.2 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.2-opcache:
php7.2-opcache depends on php7.2-common (= 7.2.7-1+0~20180622080745.23+stretch~1.gbpfd8e2e); however:
Package php7.2-common is not configured yet.
dpkg: error processing package php7.2-opcache (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
php7.2-common
php7.2-readline
php7.2
php7.2-cli
php7.2-json
libapache2-mod-php7.2
php7.2-opcache
E: Sub-process /usr/bin/dpkg returned an error code (1)
~$
I searched and searched and searched and found nothing regarding this issue. After thrashing for almost an hour, I tried ..
sudo apt-get update
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
... then tried the process again. No joy.
I'm seriously dead in the water and completely at a loss. Does anyone have any ideas what's wrong or what I may try next?
Thanks!

E: Sub-process /usr/bin/dpkg returned an error code (1)

While trying to uninstall php7.0, I got the following error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'php7.0' is not installed, so not removed
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-92 linux-headers-4.4.0-92-generic linux-headers-4.4.0-93 linux-headers-4.4.0-93-generic linux-headers-4.4.0-96
linux-headers-4.4.0-96-generic linux-image-4.4.0-92-generic linux-image-4.4.0-93-generic linux-image-4.4.0-96-generic
linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic linux-image-extra-4.4.0-96-generic
linux-signed-image-4.4.0-92-generic linux-signed-image-4.4.0-93-generic linux-signed-image-4.4.0-96-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up libapache2-mod-php7.0 (7.0.22-0ubuntu0.16.04.1) ...
dpkg: error processing package libapache2-mod-php7.0 (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of libapache2-mod-php:
libapache2-mod-php depends on libapache2-mod-php7.0; however:
Package libapache2-mod-php7.0 is not configured yet.
dpkg: error processing package libapache2-mod-php (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libapache2-mod-php7.0
libapache2-mod-php
E: Sub-process /usr/bin/dpkg returned an error code (1)
I used the following command:
sudo apt-get remove php7.0
I searched the whole internet and tried all the solutions but did not got the right solution.
This is mostly because some package or dependency got stuck in package manager.
Try the following commands (with sudo):
apt-get purge
apt-get --autoremove
apt-get --autoclean
Then try uninstalling php7.0 using the following command:
apt-get --purge remove php7.0

Errors were encountered while processing: libapache2-mod-php5 php5 php5-cli

I am using Ubuntu 11.10 now. When I struggled to install php5 by typing
sudo apt-get install php5
I got this error:
......
Errors were encountered while processing:
libapache2-mod-php5
php5
php5-cli
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've tried to do it again, but just got the same error. Then someone suggest me to remove it. I did:
sudo apt-get remove --purge php5
and got this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
php5*
0 upgraded, 0 newly installed, 1 to remove and 27 not upgraded.
3 not fully installed or removed.
After this operation, 20.5 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ...
dpkg: warning: files list file for package `firefox-locale-en' missing, assuming package has no files currently installed.
(Reading database ... 161883 files and directories currently installed.)
Removing php5 ...
Setting up libapache2-mod-php5 (5.3.6-13ubuntu3.8) ...
cp: reading `/var/lib/ucf/hashfile.5': Input/output error
dpkg: error processing libapache2-mod-php5 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up php5-cli (5.3.6-13ubuntu3.8) ...
cp: reading `/var/lib/ucf/hashfile.5': Input/output error
dpkg: error processing php5-cli (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
libapache2-mod-php5
php5-cli
Then I tried to install just php5-cli and got this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-cli is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up libapache2-mod-php5 (5.3.6-13ubuntu3.8) ...
cp: reading `/var/lib/ucf/hashfile.5': Input/output error
dpkg: error processing libapache2-mod-php5 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php5:
php5 depends on libapache2-mod-php5 (>= 5.3.6-13ubuntu3.8) | libapache2-mod-php5filter (>= 5.3.6-13ubuntu3.8) | php5-cgi (>= 5.3.6-13ubuntu3.8) | php5-fpm (>= 5.3.6-13ubuntu3.8); however:
Package libapache2-mod-php5 is not configured yet.
Package libapache2-mod-php5filter is not installed.
Package php5-cgi is not installed.
Package php5-fpm is not installed.
dpkg: error processing php5 (--configure):
dependency problems - leaving unconfigured
Setting up php5-cli (5.3.6-13ubuntu3.8) ...
No apport report written because the error message indicates its a followup error from a previous failure.
cp: reading `/var/lib/ucf/hashfile.5': Input/output error
dpkg: error processing php5-cli (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
libapache2-mod-php5
php5
php5-cli
E: Sub-process /usr/bin/dpkg returned an error code (1)
I can't open php5-cli though. What's wrong and what should I do?
Open terminal and type
sudo apt-get install -f

Categories