Score:1

libpcre unmet dependencies

id flag

I have exhausted all things that I found online trying to fix following on ubuntu 22.04

#apt install libpcre2-dev
  The following packages have unmet dependencies:
     libpcre2-dev : Depends: libpcre2-8-0 (= 10.39-3ubuntu0.1) but 10.40-1+ubuntu21.10.1+deb.sury.org+1 is to be installed
                    Depends: libpcre2-16-0 (= 10.39-3ubuntu0.1) but 10.40-1+ubuntu21.10.1+deb.sury.org+1 is to be installed
                    Depends: libpcre2-32-0 (= 10.39-3ubuntu0.1) but 10.40-1+ubuntu21.10.1+deb.sury.org+1 is to be installed
    E: Unable to correct problems, you have held broken packages.

Apparently problem is due to dist-upgrade issue from 21.10.

What I have tried so far:

apt upgrade
apt install -f libpcre2-dev
apt autoclean
apt --fix-broken install

Also here's the output of

apt-cache policy libpcre2-8-0
libpcre2-8-0:
  Installed: 10.40-1+ubuntu21.10.1+deb.sury.org+1
  Candidate: 10.40-1+ubuntu21.10.1+deb.sury.org+1
  Version table:
 *** 10.40-1+ubuntu21.10.1+deb.sury.org+1 100
        100 /var/lib/dpkg/status
     10.39-3ubuntu0.1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     10.39-3build1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Which I am not sure how to use...?

ChanganAuto avatar
us flag
Do you have the "universe" repository enabled? Did you add some 3rd party source (PPA)?
ChanganAuto avatar
us flag
Stupid me for asking stupid questions ^^^ (at least one of them). OF COURSE you added a 3rd party source from https://deb.sury.org/ and the wrong one by the look of it (Debian DPA)...
id flag
@ChanganAuto ok so what do I do to remove that wrong one? Remove it from where and add which one?
ChanganAuto avatar
us flag
Remove it the same way you added it or at Software & Updates > other... You don't need to add any 3rd party repository but if you think you need then make sure to add the "Ubuntu PPA" mentioned in the website above.
id flag
I have installed it, but still: https://gist.github.com/acosonic/bdfafd54189c7a4f0e319a2338324e90
Score:2
id flag

Eventually I was able to resolve this issue the following way:

  1. Installed apptitude sudo apt install aptitude
  2. Then aptitude install libpcre2-dev
  3. Do not accept default option to keep existing, choose N
  4. Accept solution to downgrade

The following actions will resolve these dependencies:

     Downgrade the following packages:                                                                                    
1)     libpcre2-16-0 [10.40-1+ubuntu21.10.1+deb.sury.org+1 (now) -> 10.39-3ubuntu0.1 (jammy-security, jammy-updates)]     
2)     libpcre2-16-0:i386 [10.40-1+ubuntu21.10.1+deb.sury.org+1 (now) -> 10.39-3ubuntu0.1 (jammy-security, jammy-updates)]
3)     libpcre2-32-0 [10.40-1+ubuntu21.10.1+deb.sury.org+1 (now) -> 10.39-3ubuntu0.1 (jammy-security, jammy-updates)]     
4)     libpcre2-8-0 [10.40-1+ubuntu21.10.1+deb.sury.org+1 (now) -> 10.39-3ubuntu0.1 (jammy-security, jammy-updates)]      
5)     libpcre2-8-0:i386 [10.40-1+ubuntu21.10.1+deb.sury.org+1 (now) -> 10.39-3ubuntu0.1 (jammy-security, jammy-updates)] 



Accept this solution? [Y/n/q/?] Y
adrian7 avatar
ru flag
Thanks this worked for me on wsl too. :)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.