I am trying to install some package but getting this error evry time how I can fix it? Does`nt metter if I want to install this or other package
apt-get install mysql-server php5.6-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (5.5.9999+default).
The following NEW packages will be installed:
php5.6-common php5.6-mysql
0 upgraded, 2 newly installed, 0 to remove and 398 not upgraded.
4 not fully installed or removed.
Need to get 872 kB of archives.
After this operation, 4924 kB of additional disk space will be used.
Get:1 https://packages.sury.org/php jessie/main amd64 php5.6-common amd64 5.6.36-1+0~20180505045733.13+jessie~1.gbp9b5cab [730 kB]
Get:2 https://packages.sury.org/php jessie/main amd64 php5.6-mysql amd64 5.6.36-1+0~20180505045733.13+jessie~1.gbp9b5cab [142 kB]
Fetched 872 kB in 0s (1047 kB/s)
Setting up systemd (232-25+deb9u3) ...
addgroup: The group `systemd-journal' already exists as a system group. Exiting.
adduser: The user `systemd-timesync' already exists. Exiting.
dpkg: error processing package systemd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
Try sudo apt install --reinstall systemd
Related
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$
I have recently install php7.2 on debian
#!/bin/bash
apt-get install apt-transport-https lsb-release ca-certificates
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
apt-get update
apt-get install php7.2-fpm php7.2-cli php7.2-xml
apt-get install php-curl
apt-get install php7.2-mysql
# Si apache
apt install libapache2-mod-php
a2enconf php7.2-fpm
service php7.0-fpm restart
service php7.2-fpm restart
a2dismod php7.0
a2enmod php7.2
service apache2 restart
when i try to install php-redis, (for apache) i have error during install of sub library
Preparing to unpack .../php-igbinary_2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb ...
Unpacking php-igbinary (2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058) ...
dpkg: error processing archive /var/cache/apt/archives/php-igbinary_2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb (--unpack):
trying to overwrite '/etc/php/7.0/mods-available/igbinary.ini', which is also in package php7.0-igbinary 2.0.1-1~dotdeb+8.1
Errors were encountered while processing:
/var/cache/apt/archives/php-igbinary_2.0.1- 1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
For repaire it, i have try to clean
apt-get purge php-redis
apt-get purge php-igbinary
apt-get clean
After i try to reinstall :
root#ns327838:~# apt-get install php7.2-redis
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php-redis' instead of 'php7.2-redis'
The following extra packages will be installed:
php-igbinary
The following NEW packages will be installed:
php-igbinary php-redis
0 upgraded, 2 newly installed, 0 to remove and 66 not upgraded.
Need to get 326 kB of archives.
After this operation, 2,317 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://packages.sury.org/php/ jessie/main php-igbinary amd64 2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058 [43.4 kB]
Get:2 https://packages.sury.org/php/ jessie/main php-redis amd64 4.0.0-1+0~20180412074203.5+jessie~1.gbp24a357 [282 kB]
Fetched 326 kB in 0s (654 kB/s)
(Reading database ... 62943 files and directories currently installed.)
Preparing to unpack .../php-igbinary_2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb ...
Unpacking php-igbinary (2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058) ...
dpkg: error processing archive /var/cache/apt/archives/php-igbinary_2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb (--unpack):
trying to overwrite '/etc/php/7.0/mods-available/igbinary.ini', which is also in package php7.0-igbinary 2.0.1-1~dotdeb+8.1
Selecting previously unselected package php-redis.
Preparing to unpack .../php-redis_4.0.0-1+0~20180412074203.5+jessie~1.gbp24a357_amd64.deb ...
Unpacking php-redis (4.0.0-1+0~20180412074203.5+jessie~1.gbp24a357) ...
Errors were encountered while processing:
/var/cache/apt/archives/php-igbinary_2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Have you got idea ?
Thank you in advance
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
I was told to install mysqlnd by running sudo apt-get install php5-mysqlnd. However, I seem to have received an error. Any idea what's going on and how I can fix it? I'm running Ubuntu Server.
zerg#server:~$ sudo apt-get install php5-mysqlnd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
php5-mysql
The following NEW packages will be installed: php5-mysqlnd
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 134 kB of archives.
After this operation, 247 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err http://archive.ubuntu.com/ubuntu/ trusty-updates/universe php5- mysqlnd amd64 5.5.9+dfsg-1ubuntu4.14
404 Not Found [IP: 2001:67c:1560:8001::11 80]
Err http://security.ubuntu.com/ubuntu/ trusty-security/universe php5-mysqlnd amd64 5.5.9+dfsg-1ubuntu4.14
404 Not Found [IP: 2001:67c:1560:8001::11 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/p/php5/php5-mysqlnd_5.5.9+dfsg-1ubuntu4.14_amd64.deb 404 Not Found [IP: 2001:67c:1560:8001::11 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
zerg#server:~$ sudo apt-get install php5-mysqlnd --fix-missing
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED: php5-mysql
The following NEW packages will be installed:
php5-mysqlnd
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 134 kB of archives.
After this operation, 247 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err http://archive.ubuntu.com/ubuntu/ trusty-updates/universe php5- mysqlnd amd64 5.5.9+dfsg-1ubuntu4.14
404 Not Found [IP: 2001:67c:1560:8001::11 80]
Err http://security.ubuntu.com/ubuntu/ trusty-security/universe php5-mysqlnd amd64 5.5.9+dfsg-1ubuntu4.14
404 Not Found [IP: 2001:67c:1560:8001::11 80]
(Reading database ... 28529 files and directories currently installed.)
Removing php5-mysql (5.5.9+dfsg-1ubuntu4.14) ...
php5_invoke prerm: Disable module mysql for fpm SAPI
php5_invoke prerm: Disable module mysql for cli SAPI
php5_invoke prerm: Disable module mysqli for fpm SAPI
php5_invoke prerm: Disable module mysqli for cli SAPI
php5_invoke prerm: Disable module pdo_mysql for fpm SAPI
php5_invoke prerm: Disable module pdo_mysql for cli SAPI
Processing triggers for php5-fpm (5.5.9+dfsg-1ubuntu4.14) ...
php5-fpm stop/waiting
php5-fpm start/running, process 17187
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/p/php5/php5-mysqlnd_5.5.9+dfsg-1ubuntu4.14_amd64.deb 404 Not Found [IP: 2001:67c:1560:8001::11 80]
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