I had installed QGIS 3 in the past and updated it every time in my Ubuntu 20.04. Now QGIS 3.24 is working in my system and I need to install qgis-server but as I run this command I got this error message:

sudo apt install qgis-server
Reading package lists... Done
Building dependency tree       
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:
 qgis-server : Depends: python3-qgis (= 3.10.4+dfsg-1ubuntu2) but 1:3.24.1+32focal is to be installed
               Depends: qgis-providers (= 3.10.4+dfsg-1ubuntu2) but 1:3.24.1+32focal is to be installed
E: Unable to correct problems, you have held broken packages.

enter image description here

How to fix this?

  • 1
    Try sudo apt-get update and then sudo apt-get install qgis-server
    – Mayo
    Commented Nov 8, 2022 at 13:18
  • 1
    I would first try Mayo's advice. If that does not work, give a try to the containerized version of qgis-server on Docker: hub.docker.com/r/camptocamp/qgis-server Commented Nov 8, 2022 at 19:21


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.