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...?