Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS will not install on Ubuntu 22.04 #48685

Closed
1 of 2 tasks
havenerk opened this issue May 22, 2022 · 45 comments
Closed
1 of 2 tasks

QGIS will not install on Ubuntu 22.04 #48685

havenerk opened this issue May 22, 2022 · 45 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS Feedback Waiting on the submitter for answers Linux

Comments

@havenerk
Copy link

What is the bug or the crash?

Setting up qgis-providers (1:3.24.3+36jammy-1) ...
/usr/lib/qgis/crssync: symbol lookup error: /lib/libgdal.so.30: undefined symbol: opj_encoder_set_extra_options
dpkg: error processing package qgis-providers (--configure):
installed qgis-providers package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of qgis:
qgis depends on qgis-providers (= 1:3.24.3+36jammy-1); however:
Package qgis-providers is not configured yet.

dpkg: error processing package qgis (--configure):
dependency problems - leaving unconfigured
Setting up libqgis-customwidgets (1:3.24.3+36jammy-1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of qgis-plugin-grass:
qgis-plugin-grass depends on qgis (= 1:3.24.3+36jammy-1); however:
Package qgis is not configured yet.

dpkg: error processing package qgis-plugin-grass (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up libqgisgrass7-3.24.3 (1:3.24.3+36jammy-1) ...
dpkg: dependency problems prevent configuration of python3-qgis:
python3-qgis depends on qgis-providers (= 1:3.24.3+36jammy-1); however:
Package qgis-providers is not configured yet.

dpkg: error processing package python3-qgis (--configure):
dependency problems - leaving unconfigured
Setting up python3-qgis-common (1:3.24.3+36jammy-1) ...
No apport report written because MaxReports is reached already
Setting up qgis-provider-grass (1:3.24.3+36jammy-1) ...
Errors were encountered while processing:
qgis-providers
qgis
qgis-plugin-grass
python3-qgis
E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish

Steps to reproduce the issue

sudo apt remove qgis
sudo apt autoremove
sudo apt remove geos

sudo apt install qgis

Versions

This has been true since Jammy was released. 3.22.4+ and 3.24.x all fail for the same reason.

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

Whenever I upgrade to a new Ubuntu release, the release manager helpfully uninstalls my working version of QGIS, which I then have to reinstall. The reinstall is not working this time.

@havenerk havenerk added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 22, 2022
@jef-n jef-n added the Feedback Waiting on the submitter for answers label May 22, 2022
@jef-n
Copy link
Member

jef-n commented May 22, 2022

not reproducable - there's no libgdal.so.30 in /lib but in /usr/lib. I guess you're using conflicting packages from other sources.

# apt-cache policy qgis-providers libgdal30 libopenjp2-7:amd64
qgis-providers:
  Installed: 1:3.24.3+36jammy-1
  Candidate: 1:3.24.3+36jammy-1
  Version table:
 *** 1:3.24.3+36jammy-1 500
        500 https://debian.qgis.org/debian jammy/main amd64 Packages
        100 /var/lib/dpkg/status
     3.22.4+dfsg-3build1 500
        500 http://approx:9999/ubuntu jammy/universe amd64 Packages
libgdal30:
  Installed: 3.4.1+dfsg-1build4
  Candidate: 3.4.1+dfsg-1build4
  Version table:
 *** 3.4.1+dfsg-1build4 500
        500 http://approx:9999/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status
libopenjp2-7:
  Installed: 2.4.0-6
  Candidate: 2.4.0-6
  Version table:
 *** 2.4.0-6 500
        500 http://approx:9999/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status

@havenerk
Copy link
Author

I don't get it. I have tried it with all combinations of libgdal in-not in /lib and also in-not in /usr/lib. I have removed it completely from my system to let qgis install its own dependency of gdal, thinking that if qgis needs gdal.so.30 it should install it. And it does--in both /lib and /usr/lib! In both cases libgdal.so.30 is a symlink to libgdal.so.30.0.1.

I still get this symbol error for libgdal.so.30 which results in qgis-providers not being configured which then cascades to qgis, qgis-plugin-grass, and python3-qgis.

/usr/lib/qgis/crssync: symbol lookup error: /lib/libgdal.so.30: undefined symbol
: opj_encoder_set_extra_options
dpkg: error processing package qgis-providers (--configure):
installed qgis-providers package post-installation script subprocess returned e
rror exit status 127

@jef-n
Copy link
Member

jef-n commented May 23, 2022

I don't get it. I have tried it with all combinations of libgdal in-not in /lib and also in-not in /usr/lib. I have removed it completely from my system to let qgis install its own dependency of gdal, thinking that if qgis needs gdal.so.30 it should install it. And it does--in both /lib and /usr/lib! In both cases libgdal.so.30 is a symlink to libgdal.so.30.0.1.

combinations? Above gdal comes from stock ubuntu. Are your versions the versions above?

@Pedro-Murteira Pedro-Murteira added Build/Install Related to compiling or installing QGIS Linux labels May 23, 2022
@havenerk
Copy link
Author

Yes. If I remove libgdal.so.30 symlink and libgdal.so.30.0.1 from both /lib and /usr/lib, the QGIS install puts them back in both places, symlinking /usr/libgdal.so.30 --> /usr/libgdal.so.30.0.1 and /lib/libgdal.so.30 --> /lib/libgdal.so.30.0.1. If I remove qgis, then autoremove, all instances of libgdal.30.so go away, so I'm pretty sure it is qgis doing the deed, and not some other dependency installing it on my system.

Looking through 'apt list', all libgdal related packages are 3.4.1+dfsg-1build4 amd64 except libgdal-grass/jammy 3.4.1-3 amd64.

Thoughts?

@jef-n
Copy link
Member

jef-n commented May 23, 2022

Thoughts?

apt-cache policy qgis-providers libgdal30 libopenjp2-7:amd64

The symlinks in /lib are normal. QGIS needs GDAL, so it pulls it in as dependency. But it doesn't ship it's own GDAL - what you see is ubuntu's GDAL - and opj_encoder_set_extra_options is from libopenjp2-7. I guess gdalinfo would yield the same error.

@enzedrailmaps
Copy link

I have been successfully able to install both the LTR version and the packages from the Ubuntu repository on 22.04. Have you tried either of those?

@enzedrailmaps
Copy link

Make sure you have updated Ubuntu before you attempt an installation. It is not considered to be stable until the first point release comes out.

@github-actions
Copy link

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jun 12, 2022
@havenerk
Copy link
Author

Hello Mr Github-actions bot,

No, it is still happening. To answer a few comments above. Ubuntu is up to date, who knows if it is 22.04.1? I update at least once a week. I can neither install the Ubuntu repository version, nor the qgis.org version (see below). 3.22.x was working on Ubuntu 21.10. They fail at exactly the same place, trying to configure qgis-providers and for the same reeason /usr/lib/qgis/crssync complaining about /lib/libgdal or /usr/lib/libgdal depending on who knows what. Apt seems to install libgdal.so.30.0.1 in both places (There is also a /lib/qgis and /usr/lib/qgis with identical content. Why?)

Is Ubuntu's libgdal/libopenjp2-7 broken for Ubuntu 22.04? I don't know how to test that.

Bottom line, QGIS will not install on Ubuntu 22.04 for me.

...
Setting up qgis-providers (3.22.4+dfsg-3build1) ...
/usr/lib/qgis/crssync: symbol lookup error: /lib/libgdal.so.30: undefined symbol: opj_encoder_set_extra_options
dpkg: error processing package qgis-providers (--configure):
installed qgis-providers package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of qgis:
qgis depends on qgis-providers (= 3.22.4+dfsg-3build1); however:
Package qgis-providers is not configured yet.

dpkg: error processing package qgis (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qgis-plugin-grass:
qgis-plugin-grass depends on qgis (= 3.22.4+dfsg-3build1); however:
Package qgis is not configured yet.

dpkg: error processing package qgis-plugin-grass (--configure):
dependency problems - leaving unconfigured
Setting up libqgis-app3.22.4 (3.22.4+dfsg-3build1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure
.
dpkg: dependency problems prevent configuration of python3-qgis:
python3-qgis depends on qgis-providers (= 3.22.4+dfsg-3build1); however:
Package qgis-providers is not configured yet.

dpkg: error processing package python3-qgis (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Processing triggers for shared-mime-info (2.1-2) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for libc-bin (2.35-0ubuntu3) ...
Processing triggers for man-db (2.10.2-1) ...
Errors were encountered while processing:
qgis-providers
qgis
qgis-plugin-grass
python3-qgis
E: Sub-process /usr/bin/dpkg returned an error code (1)

...
Setting up qgis-providers (1:3.24.3+36jammy-1) ...
/usr/lib/qgis/crssync: symbol lookup error: /lib/libgdal.so.30: undefined symbol: opj_encoder_set_extra_options
dpkg: error processing package qgis-providers (--configure):
installed qgis-providers package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of qgis:
qgis depends on qgis-providers (= 1:3.24.3+36jammy-1); however:
Package qgis-providers is not configured yet.

dpkg: error processing package qgis (--configure):
dependency problems - leaving unconfigured
Setting up libqgis-customwidgets (1:3.24.3+36jammy-1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of qgis-plugin-grass:
qgis-plugin-grass depends on qgis (= 1:3.24.3+36jammy-1); however:
Package qgis is not configured yet.

dpkg: error processing package qgis-plugin-grass (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up libqgisgrass7-3.24.3 (1:3.24.3+36jammy-1) ...
dpkg: dependency problems prevent configuration of python3-qgis:
python3-qgis depends on qgis-providers (= 1:3.24.3+36jammy-1); however:
Package qgis-providers is not configured yet.

dpkg: error processing package python3-qgis (--configure):
dependency problems - leaving unconfigured
Setting up python3-qgis-common (1:3.24.3+36jammy-1) ...
No apport report written because MaxReports is reached already
Setting up qgis-provider-grass (1:3.24.3+36jammy-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for libc-bin (2.35-0ubuntu3) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for shared-mime-info (2.1-2) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Errors were encountered while processing:
qgis-providers
qgis
qgis-plugin-grass
python3-qgis
E: Sub-process /usr/bin/dpkg returned an error code (1)

@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jun 12, 2022
@havenerk
Copy link
Author

Oh, and here is the relevant output from qgis-ltr:

Setting up qgis-providers (1:3.22.7+36jammy-1) ...
/usr/lib/qgis/crssync: symbol lookup error: /lib/libgdal.so.30: undefined symbol: opj_encoder_set_extra_options
dpkg: error processing package qgis-providers (--configure):
installed qgis-providers package post-installation script subprocess returned error exit status 127

@github-actions
Copy link

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jun 27, 2022
@Antoviscomi
Copy link

Antoviscomi commented Jul 19, 2022

@havenerk
I'm fall in the same issues because of a local build of gdal,
I solve it by
sudo rm -f /var/lib/dpkg/info/qgis-providers
Then
sudo apt update
sudo apt upgrade
All works fine

@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 19, 2022
@github-actions
Copy link

github-actions bot commented Aug 3, 2022

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Aug 3, 2022
@havenerk
Copy link
Author

havenerk commented Aug 3, 2022

The problem still persists with qgis 3.26.1:

Setting up qgis-providers (1:3.26.1+36jammy) ...
/usr/lib/qgis/crssync: symbol lookup error: /lib/libgdal.so.30: undefined symbol
: opj_encoder_set_extra_options
dpkg: error processing package qgis-providers (--configure):
installed qgis-providers package post-installation script subprocess returned e
rror exit status 127
dpkg: dependency problems prevent configuration of qgis:
qgis depends on qgis-providers (= 1:3.26.1+36jammy); however:
Package qgis-providers is not configured yet.

dpkg: error processing package qgis (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qgis-plugin-grass:
qgis-plugin-grass depends on qgis (= 1:3.26.1+36jammy); however:
Package qgis is not configured yet.

dpkg: error processing package qgis-plugin-grass (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-qgis:
python3-qgis depends on qgis-providers (= 1:3.26.1+36jammy); however:
Package qgis-providers is not configured yet.

dpkg: error processing package python3-qgis (--configure):
dependency problems - leaving unconfigured

I cannot install qgis-providers from 3.22 ltr, 3.24, and now 3.26

The most relevant comment I've received so far is from jef-n on May 23 above. The problem is uninstalling libopenjp2-7 and reinstalling it would also uninstall a metric crap-ton of dependencies that I could probably not recover from, including ubuntu desktop. His comment about gdalinfo is also correct. So what do I do about libopenjp2-7? Why is it different in my setup vice everyone else's who has moved to ubuntu 22.04?

@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Aug 3, 2022
@Antoviscomi
Copy link

Antoviscomi commented Aug 3, 2022

@havenerk in mine 22.04 I have libopenjpeg 8.0, after kernel update, then I rebuiltd gdal and I solved all dpkg configuration issues. (This because of a local build of gdal it uses the installed version of libopenjpeg)

@enzedrailmaps
Copy link

I have done multiple installs of Qgis LTR onto Ubuntu 22.04 and there was an issue every time. However, apt upgrade or apt full-upgrade fixed each problem as they happened. Using the project's packages rather than the Ubuntu ones. Last install I did was a week ago onto a computer that had just been upgraded in place from 20.04 to 22.04.0
As 22.04.1 has now been released maybe they have addressed this.

@enzedrailmaps
Copy link

Are you using apt full-upgrade as well as apt upgrade. Ubuntu has only just reached 22.04.1 which is the official public release of 22.04 LTS, before that it was still in beta.

@havenerk
Copy link
Author

Still no bueno. My 22.04 is upgraded weekly so I have no idea what 22.04.x point release I may be on at any given time. I do use the project's packages rather than Ubuntu's. I have no idea what libopenjpeg8 is--it isn't available, so maybe a typo in that comment. I did check to see if there was a new libopenjp2-7 and there is but it makes use of "opj_encoder_set_extra_options" as well so would likely break gdal and qgis-providers as well. I am a meteorologist/climatologist and it is possible that some grib2 tool installed the culprit libopenjp2-7 library, but most of those tools use the jasper libraries instead. Sudo apt remove libopenjp2-7 reveals several gnome, gnome-desktop, ubuntu-desktop, and libreoffice dependencies in addition to the qgis ones, so it probably wasn't one of my specialty tools that did the deed.

@Antoviscomi
Copy link

@havenerk sorry for mistake, I meant libopenjpeg 8.0

@gioman
Copy link
Contributor

gioman commented Aug 11, 2022

Still no bueno

@havenerk still looks like a local issue and not a general one.

@havenerk
Copy link
Author

Setting up qgis-providers (1:3.26.2+36jammy) ...
/usr/lib/qgis/crssync: symbol lookup error: /lib/libgdal.so.30: undefined symbol
: opj_encoder_set_extra_options
dpkg: error processing package qgis-providers (--configure):
installed qgis-providers package post-installation script subprocess returned e
rror exit status 127
dpkg: dependency problems prevent configuration of qgis:
qgis depends on qgis-providers (= 1:3.26.2+36jammy); however:
Package qgis-providers is not configured yet.

So I removed (and autoremoved) all qgis and gdal packages, installed qgis and still get this error. I think my previous discussion of libopenjp2 was a red herring as I can find no dependencies of that library in the release files. @gioman, I would not call this a local issue because the error message is clearly impossible to reconcile--QGIS installs both of the conflicting libraries. Before I install, those libraries simply do not exist on the target machine. Afterward both are present and the error condition presents itself. But yet the conflict does not present on other machines, even another one of mine. The good machine is older, and AMD based, but both are bog standard unimpressive HP laptops and both started out as impish to jammy upgrades. Of course both upgrades uninstalled qgis, which I then re-installed or have at least attempted to.

@jef-n
Copy link
Member

jef-n commented Aug 20, 2022

As said before it's not a QGIS problem. GDAL comes from an other source (eg. Ubuntu) and that depends on openjp2 and misses a symbol on your machine. QGIS installs fine on a fresh jammy. Probably some local leftovers from upgrades on your machine. I suppose GDAL is inoperable on your box too whether you install QGIS or not.

@havenerk
Copy link
Author

Yes, gdal is broken when I install gdal-bin as a standalone program.

@Antoviscomi
Copy link

@havenerk can you try to install libopenjpeg 8.0? In my case all works fine after this library installation

@havenerk
Copy link
Author

@Antoviscomi, I can find no such package (libopenjpeg 8. I already have libjpeg8 installed (and also libjpeg9).

@Antoviscomi
Copy link

@havenerk sorry for mistake you're right, the package is libjpeg 8.0, however only one version of this must be installed 8 or 9, double version installed, create conflict with gdal

@havenerk
Copy link
Author

@Antoviscomi I removed libjpeg9 to no effect. Still getting the same error. Reinstalled libjpeg8, also to no effect. I've asked the same question on the gdal git page. Maybe someone there knows what could be causing the conflict.

@jef-n
Copy link
Member

jef-n commented Aug 21, 2022

opj_encoder_set_extra_options is new to openjpeg 2.4.0. I guess you have (possibly leftovers of) an earlier version around that GDAL for some reason picks up.

How it looks like here on a fresh jammy:

# ldd /usr/bin/gdalinfo  | grep openjp 
	libopenjp2.so.7 => /lib/x86_64-linux-gnu/libopenjp2.so.7 (0x00007f3c8d184000)
# dpkg -S libopenjp2.so.7
libopenjp2-7:amd64: /usr/lib/x86_64-linux-gnu/libopenjp2.so.7
# dpkg -s libopenjp2-7:amd64 | grep ^Version:
Version: 2.4.0-6

Forcefully going back to impish's version:

# gdalinfo
Usage: gdalinfo [--help-general] [-json] [-mm] [-stats | -approx_stats] [-hist] [-nogcp] [-nomd]
                [-norat] [-noct] [-nofl] [-checksum] [-proj4]
                [-listmdd] [-mdd domain|`all`] [-wkt_format WKT1|WKT2|...]*
                [-sd subdataset] [-oo NAME=VALUE]* [-if format]* datasetname

FAILURE: No datasource specified.
# dpkg -i /var/cache/apt/archives/libopenjp2-7_2.3.1-1ubuntu4_amd64.deb 
dpkg: warning: downgrading libopenjp2-7:amd64 from 2.4.0-6 to 2.3.1-1ubuntu4
(Reading database ... 13018 files and directories currently installed.)
Preparing to unpack .../libopenjp2-7_2.3.1-1ubuntu4_amd64.deb ...
Unpacking libopenjp2-7:amd64 (2.3.1-1ubuntu4) over (2.4.0-6) ...
Setting up libopenjp2-7:amd64 (2.3.1-1ubuntu4) ...
Processing triggers for libc-bin (2.35-0ubuntu3) ...
# gdalinfo
gdalinfo: symbol lookup error: /lib/libgdal.so.30: undefined symbol: opj_encoder_set_extra_options

@havenerk
Copy link
Author

SOLVED. Thank you @jef-n. My clumsy attempt with ldd didn't show anything, but when I invoked your command, I found a stray /usr/local/lib version of openjp2 version 2.3.0. I expect it was part of some meteorology software that I'd installed. Was not present on the one system that worked.

@damiandixon
Copy link

I found uninstalling gdal-bin and reinstalling qgis sorted this issue for me.

qgis has a dependency on libgdal-grass

@jef-n
Copy link
Member

jef-n commented Sep 6, 2022

qgis has a dependency on libgdal-grass

QGIS doesn't need grass support in GDAL.

@idantene
Copy link

@havenerk what was your solution?
I'm running into similar issues but it cites

/usr/lib/qgis/crssync: error while loading shared libraries: libproj.so.19: cannot open shared object file: No such file or directory

As the issue (which makes sense, since I have libproj22 installed, which is also the requirement -- not sure why it's looking for libproj.so.19).

@havenerk
Copy link
Author

havenerk commented Sep 13, 2022 via email

@idantene
Copy link

Thanks for clarifying @havenerk! I cleared many of those, but no matter what I do, I do not have libproj.so.19 anywhere, and have no idea why it's needed specifically...

Creating a link results in undefined symbols as well, so I'm a bit stumped now 🤔

@havenerk
Copy link
Author

havenerk commented Sep 13, 2022 via email

@idantene
Copy link

Thanks @havenerk! I managed to resolve the issue, and for what it's worth (for potential future troubleshooters), here's the rundown on my end:

  1. I install gdal/proj/geos manually at some point in a past life. Can't recall which, doesn't really matter.
  2. Following this thread, and specifically this comment, I realized that apt install installs to /usr/lib/x86_64-linux-gnu/.
  3. At the same time, I realized that a manual installation puts files into /usr/local/lib/, where I found some older version of e.g. libgdal and libgeos.
  4. Those libraries were found prior to the /usr/lib ones - I removed those with a simple rm /usr/local/lib/libg*
  5. ??
  6. Profit

@paddleman
Copy link

Running into a similar problem on Ubuntu Jammy 22.04. QGIS (either 3.28 or 3.26.1 from the Software Store) will not install. And I removed a fully functioning version of 3.26.1 so now I have nothing. Here is the IO from

sudo apt install qgis

.....
\The following packages have unmet dependencies:
libqgis-analysis3.28.0 : Depends: libgsl25 (>= 2.6) but it is not installable
libqgis-app3.28.0 : Depends: libpdal-base12 (>= 1.7.0) but it is not installable
libqgis-core3.28.0 : Depends: libpdal-base12 (>= 2.2.0) but it is not installable
Depends: libpdal-util12 (>= 1.1.0) but it is not installable
python3-qgis : Depends: python3 (< 3.10) but 3.10.6-1~22.04 is to be installed
qgis-providers : Depends: libpdal-base12 (>= 2.2.0) but it is not installable
Depends: libpdal-util12 (>= 1.9.1) but it is not installable
Depends: qtbase-abi-5-15-2 but it is not installable
E: Unable to correct problems, you have held broken packages.

All help is appreciated

Thanks.

@Antoviscomi
Copy link

Antoviscomi commented Oct 27, 2022

@paddleman I solve it by removing all qgis* info files
by
sudo rm /var/lib/dpkg/info/qgis*

then

sudo apt update
sudo apt upgrade

or (in your case)

sudo apt install qgis

@havenerk
Copy link
Author

havenerk commented Oct 27, 2022 via email

@makilagied
Copy link

sudo apt install qgis
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:
libarmadillo10 : Depends: liblapack3 but it is not installable or
liblapack.so.3
libarpack2 : Depends: libgfortran5 (>= 8) but it is not installable
Depends: liblapack3 but it is not installable or
liblapack.so.3
python3-numpy : Depends: liblapack3 but it is not installable or
liblapack.so.3
python3-pil.imagetk : Depends: python3-pil (= 9.0.1-1build1) but 9.0.1-1ubuntu0.1 is to be installed
E: Unable to correct problems, you have held broken packages.

any one can help?

@MayQueen
Copy link

MayQueen commented Mar 1, 2023

I also met this error while installing qgis on Ubuntu 22.04, and my solution is to install and use qgis in the conda environment. For details, please refer to https://gisunchained.wordpress.com/2019/05/29/using-qgis-from-conda/.

@astronomico
Copy link

special thanks > more indifferent

https://blog.csdn.net/qq_38979769/article/details/129723825

download sqlite-autoconf-${current_version}.tar.gz version no amalgamation

tar -xvf sqlite-autoconf-3420000.tar.gz

cd sqlite-autoconf-3420000/

gedit sqlite3.c

edit first macro definitions lines and add define SQLITE_ENABLE_COLUMN_METADATA 1 like this


#ifndef SQLITE_TCLAPI
#  define SQLITE_TCLAPI
#  define SQLITE_ENABLE_COLUMN_METADATA 1
#endif

save and make install

./configure

make

make uninstall

make install

enjoy

if the installation is corrupted retry

sudo apt install qgis qgis-plugin-grass

@richwrd
Copy link

richwrd commented Oct 17, 2023

Try it, it worked here
sudo apt purge libgeos-c1v5

Try removing ALL gdal packages and reinstalling first gdal-bin and libgdal-dev and lastly qgis

@jrevueltaa
Copy link

@paddleman I solve it by removing all qgis* info files by sudo rm /var/lib/dpkg/info/qgis* then sudo apt update sudo apt upgrade or (in your case) sudo apt install qgis

Nice and simple solution. Thanks

@Antoviscomi
Copy link

Antoviscomi commented May 16, 2024

Try it, it worked here sudo apt purge libgeos-c1v5

Try removing ALL gdal packages and reinstalling first gdal-bin and libgdal-dev and lastly qgis

In mine I should need to rebuild gdal, because of a local build version, so this solution is useful for those have a classic installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS Feedback Waiting on the submitter for answers Linux
Projects
None yet
Development

No branches or pull requests