Recently i Upgraded my ubuntu 21.04 to 21.10. when update get finished i got an notification like you have held broken package to resolve please use partial update. I updated again i got an error or new update like arround 12 mb update. I started upgrading i got this
Package dependencies cannot be resolved
This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time.
Transaction failed: Package dependencies cannot be resolved
The following packages have unmet dependencies:
php7.2-cli: Depends: libpcre3 (>= 2:8.41) but 2:8.44-2+ubuntu20.10.1+deb.sury.org+1 is to be installed
Depends: php7.2-common (= 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) but 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 is to be installed
Depends: zlib1g (>= 1:1.1.4) but 1:1.2.11.dfsg-2ubuntu7 is to be installed
I Don't understand why every time we got stucked with php only. I am a web developer Working for a startup they have so many projects on php7.2. Now i am stucked everytime with every update like problem with composer package, php versions issues and lastly for apache2.
I want to ask you why ubuntu are not supporting php versions.
By the way here is my problem.
Apache2 cann't starts
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details.
apache-htcacheclean.service is a disabled or a static unit not running, not starting it.
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for ufw (0.36.1-1) ...
Rules updated for profile 'Apache'
Rules updated for profile 'Apache Full'
Firewall reloaded
I try to resolved by terminal i got this
sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
php7.2-cli php7.2-common php7.2-curl php7.2-fpm php7.2-intl php7.2-json
php7.2-mbstring php7.2-mysql php7.2-opcache php7.2-readline php7.2-xml
php7.2-zip
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded
I used this
$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.`
Then i tried this
$ sudo dpkg --configure -a
$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded
Here is my term.log when my system upgraded
Log started: 2021-10-10 01:46:59 dpkg: warning: downgrading php7.2-zip from 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 to
7.2.34-23+ubuntu21.04.1+deb.sury.org+1 (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15%
(Reading database ... 20% (Reading database ... 25% (Reading database
... 30% (Reading database ... 35% (Reading database ... 40% (Reading
database ... 45% (Reading database ... 50% (Reading database ... 55%
(Reading database ... 60% (Reading database ... 65% (Reading database
... 70% (Reading database ... 75% (Reading database ... 80% (Reading
database ... 85% (Reading database ... 90% (Reading database ... 95%
(Reading database ... 100% (Reading database ... 262970 files and
directories currently installed.) Preparing to unpack
.../00-php7.2-zip_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.2-zip (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) over
(7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) ... dpkg: warning:
downgrading php7.2-xml from
7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 to 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 Preparing to unpack .../01-php7.2-xml_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.2-xml (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) over
(7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) ... dpkg: warning:
downgrading php7.2-readline from
7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 to 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 Preparing to unpack .../02-php7.2-readline_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb
... Unpacking php7.2-readline (7.2.34-23+ubuntu21.04.1+deb.sury.org+1)
over (7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) ... dpkg: warning:
downgrading php7.2-opcache from
7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 to 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 Preparing to unpack .../03-php7.2-opcache_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb
... Unpacking php7.2-opcache (7.2.34-23+ubuntu21.04.1+deb.sury.org+1)
over (7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) ... dpkg: warning:
downgrading php7.2-mysql from
7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 to 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 Preparing to unpack .../04-php7.2-mysql_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb
... Unpacking php7.2-mysql (7.2.34-23+ubuntu21.04.1+deb.sury.org+1)
over (7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) ... dpkg: warning:
downgrading php7.2-mbstring from
7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 to 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 Preparing to unpack .../05-php7.2-mbstring_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb
... Unpacking php7.2-mbstring (7.2.34-23+ubuntu21.04.1+deb.sury.org+1)
over (7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) ... dpkg: warning:
downgrading php7.2-json from
7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 to 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 Preparing to unpack .../06-php7.2-json_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb
... Unpacking php7.2-json (7.2.34-23+ubuntu21.04.1+deb.sury.org+1)
over (7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) ... dpkg: warning:
downgrading php7.2-cli from
7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 to 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 Preparing to unpack .../07-php7.2-cli_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.2-cli (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) over
(7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) ... dpkg: warning:
downgrading php7.2-fpm from
7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 to 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 Preparing to unpack .../08-php7.2-fpm_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.2-fpm (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) over
(7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) ... dpkg: warning:
downgrading php7.2-intl from
7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 to 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 Preparing to unpack .../09-php7.2-intl_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb
... Unpacking php7.2-intl (7.2.34-23+ubuntu21.04.1+deb.sury.org+1)
over (7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) ... dpkg: warning:
downgrading php7.2-common from
7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 to 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 Preparing to unpack .../10-php7.2-common_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb
... Unpacking php7.2-common (7.2.34-23+ubuntu21.04.1+deb.sury.org+1)
over (7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00) ... (Reading
database ... (Reading database ... 5% (Reading database ... 10%
(Reading database ... 15% (Reading database ... 20% (Reading database
... 25% (Reading database ... 30% (Reading database ... 35% (Reading
database ... 40% (Reading database ... 45% (Reading database ... 50%
(Reading database ... 55% (Reading database ... 60% (Reading database
... 65% (Reading database ... 70% (Reading database ... 75% (Reading
database ... 80% (Reading database ... 85% (Reading database ... 90%
(Reading database ... 95% (Reading database ... 100% (Reading database
... 262971 files and directories currently installed.) Removing
libicu65:amd64 (65.1-1+0~20200223.8+debian9~1.gbp519cf3) ... Selecting
previously unselected package php7.2-curl. (Reading database ...
(Reading database ... 5% (Reading database ... 10% (Reading database
... 15% (Reading database ... 20% (Reading database ... 25% (Reading
database ... 30% (Reading database ... 35% (Reading database ... 40%
(Reading database ... 45% (Reading database ... 50% (Reading database
... 55% (Reading database ... 60% (Reading database ... 65% (Reading
database ... 70% (Reading database ... 75% (Reading database ... 80%
(Reading database ... 85% (Reading database ... 90% (Reading database
... 95% (Reading database ... 100% (Reading database ... 262955 files
and directories currently installed.) Preparing to unpack
.../php7.2-curl_7.2.34-23+ubuntu21.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.2-curl (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ...
Setting up php7.2-common (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ...
Setting up php7.2-opcache (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ...
Setting up php7.2-zip (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ...
Setting up php7.2-curl (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ...
Creating config file /etc/php/7.2/mods-available/curl.ini with new
version Setting up php7.2-json
(7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ... Setting up php7.2-mysql
(7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ... Setting up
php7.2-mbstring (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ... Setting
up php7.2-intl (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ... Setting up
php7.2-xml (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ... Setting up
php7.2-readline (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ... Setting
up php7.2-cli (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ... Setting up
php7.2-fpm (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ... NOTICE: Not
enabling PHP 7.2 FPM by default. NOTICE: To enable PHP 7.2 FPM in
Apache2 do: NOTICE: a2enmod proxy_fcgi setenvif NOTICE: a2enconf
php7.2-fpm NOTICE: You are seeing this message because you have
apache2 package installed. Processing triggers for libc-bin
(2.33-0ubuntu5) ... Processing triggers for man-db (2.9.4-2) ...
Processing triggers for php7.2-cli
(7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ... Processing triggers for
php7.2-fpm (7.2.34-23+ubuntu21.04.1+deb.sury.org+1) ... NOTICE: Not
enabling PHP 7.2 FPM by default. NOTICE: To enable PHP 7.2 FPM in
Apache2 do: NOTICE: a2enmod proxy_fcgi setenvif NOTICE: a2enconf
php7.2-fpm NOTICE: You are seeing this message because you have
apache2 package installed. Log ended: 2021-10-10 01:49:13
This is my debian php search result
dpkg -l | grep -E "sury|debian9"
rc libapache2-mod-php7.2 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii libapr1:amd64 1.7.0-6+ubuntu20.10.1+deb.sury.org+2 amd64 Apache Portable Runtime Library ```
ii libargon2-1:amd64 0~20190702-0.1+0~20190710.3+debian9~1.gbp2fb167 amd64 memory-hard hashing function - runtime library
ii libbrotli-dev:amd64 1.0.9-2+ubuntu20.10.1+deb.sury.org+1 amd64 library implementing brotli encoder and decoder (development files) I need only php7.2 and apache2. I was frustrated and manually deleted some php versions directory so i can't purge now.
ii libbrotli1:amd64 1.0.9-2+ubuntu20.10.1+deb.sury.org+1 amd64 library implementing brotli encoder and decoder (shared libraries)
ii libicu65:amd64 65.1-1+0~20200223.8+debian9~1.gbp519cf3 amd64 International Components for Unicode It happens because i have multiple php versions like php7.2 , php7.4 and php8.0. I upgraded from software update GUI. I thoughti was easy but i mistaken.
ii libpcre16-3:amd64 2:8.44-2+ubuntu20.10.1+deb.sury.org+1 amd64 Perl 5 Compatible Regular Expression Library - 16 bit runtime files
ii libpcre2-16-0:amd64 10.38-2+ubuntu21.04.1+deb.sury.org+1 amd64 New Perl Compatible Regular Expression Library - 16 bit runtime files
ii libpcre2-32-0:amd64 10.38-2+ubuntu21.04.1+deb.sury.org+1 amd64 New Perl Compatible Regular Expression Library - 32 bit runtime files
ii libpcre2-8-0:amd64 10.38-2+ubuntu21.04.1+deb.sury.org+1 amd64 New Perl Compatible Regular Expression Library- 8 bit runtime files
ii libpcre2-dev:amd64 10.38-2+ubuntu21.04.1+deb.sury.org+1 amd64 New Perl Compatible Regular Expression Library - development files
ii libpcre2-posix2:amd64 10.38-2+ubuntu21.04.1+deb.sury.org+1 amd64 New Perl Compatible Regular Expression Library - posix-compatible runtime files
ii libpcre3:amd64 2:8.44-2+ubuntu20.10.1+deb.sury.org+1 amd64 Perl 5 Compatible Regular Expression Library - runtime files
ii libpcre3-dev:amd64 2:8.44-2+ubuntu20.10.1+deb.sury.org+1 amd64 Perl 5 Compatible Regular Expression Library - development files
ii libpcre32-3:amd64 2:8.44-2+ubuntu20.10.1+deb.sury.org+1 amd64 Perl 5 Compatible Regular Expression Library - 32 bit runtime files
ii libpcrecpp0v5:amd64 2:8.44-2+ubuntu20.10.1+deb.sury.org+1 amd64 Perl 5 Compatible Regular Expression Library - C++ runtime files
ii libsodium23:amd64 1.0.18-1+0~20191009.1+debian9~1.gbpb6823f amd64 Network communication, cryptography and signaturing library
ii libzip4:amd64 1.7.3-1+0~20210114.10+debian9~1.gbp4c125d amd64 library for reading, creating, and modifying zip archives (runtime)
ii php-common 2:84+ubuntu21.04.1+deb.sury.org+1 all Common files for PHP packages
ii php-curl 2:8.0+84+ubuntu21.04.1+deb.sury.org+1 all CURL module for PHP [default]
ii php7.0-cli 7.0.33-54+ubuntu21.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.0-common 7.0.33-54+ubuntu21.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php7.0-json 7.0.33-54+ubuntu21.04.1+deb.sury.org+1 amd64 JSON module for PHP
ii php7.0-opcache 7.0.33-54+ubuntu21.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php7.0-readline 7.0.33-54+ubuntu21.04.1+deb.sury.org+1 amd64 readline module for PHP
ii php7.1-cli 7.1.33-41+ubuntu21.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.1-common 7.1.33-41+ubuntu21.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php7.1-json 7.1.33-41+ubuntu21.04.1+deb.sury.org+1 amd64 JSON module for PHP
ii php7.1-opcache 7.1.33-41+ubuntu21.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php7.1-readline 7.1.33-41+ubuntu21.04.1+deb.sury.org+1 amd64 readline module for PHP rc php7.2-cli 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.2-common 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 amd64 documentation, examples and common module for PHP rc php7.2-curl 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 amd64 CURL module for PHP rc php7.2-fpm 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php7.2-intl 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 amd64 Internationalisation module for PHP
ii php7.2-json 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 amd64 JSON module for PHP
ii php7.2-mbstring 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 amd64 MBSTRING module for PHP
ii php7.2-mysql 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 amd64 MySQL module for PHP
ii php7.2-opcache 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 amd64 Zend OpCache module for PHP rc php7.2-readline 7.2.34-23+ubuntu21.04.1+deb.sury.org+1 amd64 readline module for PHP
ii php7.2-xml 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii php7.2-zip 7.2.34-25+0~20210923.65+debian9~1.gbpa3cd00 amd64 Zip module for PHP
ii php7.3-cli 7.3.31-1+ubuntu21.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.3-common 7.3.31-1+ubuntu21.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php7.3-json 7.3.31-1+ubuntu21.04.1+deb.sury.org+1 amd64 JSON module for PHP
ii php7.3-opcache 7.3.31-1+ubuntu21.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php7.3-readline 7.3.31-1+ubuntu21.04.1+deb.sury.org+1 amd64 readline module for PHP
ii php7.4-cli 7.4.24-1+ubuntu21.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.4-common 7.4.24-1+ubuntu21.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP rc php7.4-gd 7.4.24-1+ubuntu21.04.1+deb.sury.org+1 amd64 GD module for PHP
ii php7.4-json 7.4.24-1+ubuntu21.04.1+deb.sury.org+1 amd64 JSON module for PHP
ii php7.4-mysql 7.4.24-1+ubuntu21.04.1+deb.sury.org+1 amd64 MySQL module for PHP
ii php7.4-opcache 7.4.24-1+ubuntu21.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php7.4-readline 7.4.24-1+ubuntu21.04.1+deb.sury.org+1 amd64 readline module for PHP rc php7.4-xml 7.4.24-1+ubuntu21.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, XML, and XSL module for PHP
ii php8.0-common 8.0.11-1+ubuntu21.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php8.0-curl 8.0.11-1+ubuntu21.04.1+deb.sury.org+1 amd64 CURL module for PHP
rc php8.0-gd 8.0.11-1+ubuntu21.04.1+deb.sury.org+1 amd64 GD module for PHP
rc php8.0-mysql 8.0.11-1+ubuntu21.04.1+deb.sury.org+1 amd64 MySQL module for PHP
rc php8.0-xml 8.0.11-1+ubuntu21.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, XML, and XSL module for PHP
I need only php7.2 and apache2. I was frustrated and manually deleted some php versions directory so i can't purge now.
It happens because i have multiple php versions like php7.2 , php7.4 and php8.0. I upgraded from software update GUI. I thoughti was easy but i mistaken.