Environment: Ubuntu 20.04
Ran sudo apt-get install libxml2-dev in terminal. However it returned the messages below:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libxml2-dev : Depends: libxml2 (= 2.9.10+dfsg-6.3ubuntu0.1) but 2.9.12+dfsg-0+ubuntu21.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.
What does libxml2-dev : Depends: libxml2 (= 2.9.10+dfsg-6.3ubuntu0.1) but 2.9.12+dfsg-0+ubuntu21.04.1+deb.sury.org+1 is to be installed mean? How can I solve it?
Thanks!
I had a similar situation: libxml2-dev : Depends: libxml2 (= 2.9.3+dfsg1-1ubuntu0.7) but 2.9.4-1+deb.sury.org~xenial+2 is to be installed
I somehow had a newer version, than the package depended on. I solved this with a downgrade: apt-cache policy libxml2 --> apt install libxml2=2.9.3+dfsg1-1ubuntu0.7
Solution here (but I wrote the tutorial in French) : https://forum.ubuntu-fr.org/viewtopic.php?pid=22551079
Long story short : Uninstall ppa:ondrej/php via ppa-purge solved my issue !
command to run:
sudo add-apt-repository --remove ppa:ondrej/php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With