9

HI got this will installing anything.

(base) mi@adib:~$ sudo apt install gnupg software-properties-common
[sudo] password for mi: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gnupg is already the newest version (2.2.19-3ubuntu2).
software-properties-common is already the newest version (0.98.9.3).
The following packages were automatically installed and are no longer required:
  libgsl23 libgslcblas0 libjs-leaflet libqgis-3d3.16.2 libqgis-analysis3.16.2
  libqgis-app3.16.2 libqgis-app3.16.3 libqgis-core3.16.2 libqgis-gui3.16.2
  libqgis-native3.16.2 libqgis-server3.16.2 libqgispython3.16.2 libqt5charts5
  qgis-common qml-module-qtcharts r-cran-mathjaxr
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up qgis-providers (1:3.16.3+32focal) ...
    - 'VirtualXPath'    [XML Path Language - XPath]
    - 'VirtualXPath'    [XML Path Language - XPath]
    - 'VirtualXPath'    [XML Path Language - XPath]
free(): invalid pointer
Aborted (core dumped)
dpkg: error processing package qgis-providers (--configure):
 installed qgis-providers package post-installation script subprocess returned e
rror exit status 134
dpkg: dependency problems prevent configuration of python3-qgis:
 python3-qgis depends on qgis-providers (= 1:3.16.3+32focal); however:
  Package qgis-providers is not configured yet.

dpkg: error processing package python3-qgis (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-qgis:
 python-qgis depends on python3-qgis; however:
  Package python3-qgis is not configured yet.

dpkg: error processing package python-qgis (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup erro
r from a previous failure.
                          No apport report written because the error message ind
icates its a followup error from a previous failure.
                                                    Errors were encountered whil
e processing:
 qgis-providers
 python3-qgis
 python-qgis
E: Sub-process /usr/bin/dpkg returned an error code (1)
0

4 Answers 4

10

I ran into the same issue on updating QGIS.

There is already a bug report in Github for it.

You have to remove older versions of libproj manually, as described in the answers to the bug report:

 # remove offending lib while keeping package dependency installed (wow, ugly):
 rm -f /lib/x86_64-linux-gnu/libproj.so.15
 ln -s /lib/x86_64-linux-gnu/libproj.so.19 /lib/x86_64-linux-gnu/libproj.so.15

Folder names might be different for you, so look them up manually.

See also this similar GisStackExchange topic.

2
  • Thanks worked for me !! Dec 28, 2021 at 3:55
  • Lately you will need to replace 19 by 22: ln -s /lib/x86_64-linux-gnu/libproj.so.22 /lib/x86_64-linux-gnu/libproj.so.15
    – Stefan_EOX
    May 20, 2022 at 13:03
7

To fix this on my side, I had to uninstall libproj* manually

sudo apt remove libproj15 libproj-dev libproj19
1

A proper way to install symlinks without the full path from root, as they are designed in official Debian / Ubuntu packages.

First list all version of libproj installed on the system

$ apt list libproj*
Listing... Done
libproj-dev/focal,focal,focal,now 8.2.1-1~20.04.sav0 amd64 [installed]
libproj15/focal,now 6.3.1-1 amd64 [installed,automatic]
libproj22/focal,focal,focal,now 8.2.1-1~20.04.sav0 amd64 [installed,automatic]
libprojectm-dev/focal 3.1.12-0~focal amd64
libprojectm2v5/focal 2.1.0+dfsg-4ubuntu3~focal1 amd64
libprojectm3/focal 3.1.12-0~focal amd64
$ 

/lib is a symlink to /usr/lib

Then list all libraries installed

$ ls /usr/lib/x86_64-linux-gnu/libproj.so.*
/usr/lib/x86_64-linux-gnu/libproj.so.15      /usr/lib/x86_64-linux-gnu/libproj.so.22
/usr/lib/x86_64-linux-gnu/libproj.so.15.3.1  /usr/lib/x86_64-linux-gnu/libproj.so.22.2.1
$ 

However, libproj.so.15 is cyan colored in Terminal telling it's a symbolic link (symlink) to libproj.so.15.3.1. As well, libproj.so.22 is a symbolic link (symlink) to libproj.so.22.2.1

So, I removed the offending symlink libproj.so.15 and reassigned it to target symlink libproj.so.22, but I don't assign the full path from root / at creation, as I create the symlink anywhere in my home directory and don't use sudo. Right after, a move command to the target file system directory /usr/lib/x86_64-linux-gnu/ does the trick :

$ sudo rm -rf /usr/lib/x86_64-linux-gnu/libproj.so.15
$ ln -s libproj.so.22 libproj.so.15
$ sudo mv libproj.so.15 /usr/lib/x86_64-linux-gnu/

Checking on half-configured packages in the system :

$ dpkg-query -f '${status} ${package}\n' -W | awk '$3 == "half-configured" {print $4}'
qgis-providers
$ 

Re-installing the qgis-providers package :

$ sudo apt-get --reinstall install qgis-providers
0

Let's look at the qgis-providers package.

  • The current version in Ubuntu 20.04 is 3.10.4+dfsg-1ubuntu2
  • You are trying to install version 3.16.3+32focal.

This tells us that you are attempting to install a broken or incompatible package from some non-Ubuntu source.

How to fix it:

  1. Uninstall ALL packages from that non-Ubuntu source.
  2. Disable that non-Ubuntu source.
  3. Then install qgis from the Ubuntu repositories.
  4. File a bug report with that non-Ubuntu source to let them know that their package is incompatible with Ubuntu 20.04 (or broken).
1
  • 1
    The non-Ubuntu source is the official QGIS repostory, which works fine in most cases.
    – AndreJ
    Mar 9, 2021 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .