error processing archive /var/cache/apt/archives/libpcre2-posix3_10.39-3+u, trying to overwrite '/usr/lib/x86_64-linux-gnu/libpcre2-posix.so.3.0.1', which is also in package libpcre2-posix2:amd64 10.39-2+ubuntu20.04.1+deb.sury.org+1

Bug #1966855 reported by Kamil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcre2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

owner@device:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libpcre2-posix2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  libpcre2-posix3
The following NEW packages will be installed:
  libpcre2-posix3
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
1 not fully installed or removed.
Need to get 8 068 B of archives.
After this operation, 34,8 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 libpcre2-posix3 amd64 10.39-3+ubuntu20.04.1+deb.sury.org+1 [8 068 B]
Fetched 8 068 B in 0s (20,5 kB/s)
(Reading database ... 377119 files and directories currently installed.)
Preparing to unpack .../libpcre2-posix3_10.39-3+ubuntu20.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libpcre2-posix3:amd64 (10.39-3+ubuntu20.04.1+deb.sury.org+1) ...
dpkg: error processing archive /var/cache/apt/archives/libpcre2-posix3_10.39-3+u
buntu20.04.1+deb.sury.org+1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libpcre2-posix.so.3.0.1', which
is also in package libpcre2-posix2:amd64 10.39-2+ubuntu20.04.1+deb.sury.org+1
Errors were encountered while processing:
 /var/cache/apt/archives/libpcre2-posix3_10.39-3+ubuntu20.04.1+deb.sury.org+1_am
d64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Tags: focal
Revision history for this message
Kamil (kamil2018) wrote :

Initially, upgrade failed in UI.

I found 4-month bug report on similar topic, but I'm not sure how it can be resolved: https://askubuntu.com/questions/1377997/the-package-system-is-broken-in-ubuntu-21-04-with-php-ppa

Revision history for this message
Kamil (kamil2018) wrote :

I would like to add that I need to have installed several PHP versions together since 7.2 till 8.1.

Paul White (paulw2u)
affects: ubuntu → pcre2 (Ubuntu)
tags: added: focal
Revision history for this message
Kamil (kamil2018) wrote :

Not sure whether it is relevant, but due to recent incidents with breaking some software for IP addresses based Russia, I think I need to say that upgrade was performed from IP address in Russia.

Revision history for this message
Kamil (kamil2018) wrote :
Revision history for this message
Kamil (kamil2018) wrote :

Response at sury.org did not contain enough instructions for resolving issue, but by reaction on bug I understood that it is not serious. So, I resolved issue locally by myself in the following way (however, without full understanding of consequences):

sudo dpkg --purge libpcre2-posix2
sudo apt --fix-broken install
sudo apt upgrade

(The instructions are provided for those who encountered the same bug but have not enough knowledge in Linus administration.)

This issue may be closed.

Changed in pcre2 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.