homebrew-osgeo4mac: QGIS doesn't start after upgrade: "dyld: Library not loaded: /usr/local/opt/osgeo-proj/lib/libproj.13.dylib"
Please answers the following
I’ve…
- I read
- the reporting issues
- the troubleshooting
- I checked the documentation and found no answer
- I tried to install after following the suggestions
- I am running the latest version (
brew update
twice?) - I checked to make sure that this issue has not already been filed
- I uploaded logs:
brew gist-logs formula
Describe the bug
I run brew upgrade
yesterday without getting any error but after finishing upgrading I was not able to run QGIS again.
When I run from terminal /usr/local/opt/osgeo-qgis/bin/osgeo-qgis
I get:
dyld: Library not loaded: /usr/local/opt/osgeo-proj/lib/libproj.13.dylib Referenced from: /usr/local/opt/osgeo-qgis/QGIS.app/Contents/MacOS/QGIS Reason: image not found /usr/local/opt/osgeo-qgis/bin/osgeo-qgis: line 20: 41976 Abort trap: 6 /usr/local/opt/osgeo-qgis/QGIS.app/Contents/MacOS/QGIS “$@”
I reinstalled QGIS following all the instructions but I’m still getting the same error.
Any idea what can be the problem?
Thanks!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 39
To clarify @berkayoruc, I had to unlink and reinstall several other packages from the older versions in the repository to get QGIS to start:
Thanks, but no need this time – I was able to install directly from the commit history. E.g., for osgeo-gdal 2.4.1:
I don’t mean to criticize @fjperini or anyone else putting in the hard work to update the formulas, but wouldn’t it be better to hold back on merging in the updates to, e.g., osgeo-proj, osgeo-gdal, etc. until all of the formulas that depend on those have been updated and are ready to be merged in? That would avoid the situation we find ourselves in every time these are updated.
Before I would’ve just run
brew switch osgeo-gdal 2.4.1
etc., but combined with the change in Homebrew to automatically runbrew cleanup
when upgrading unless theHOMEBREW_NO_INSTALL_CLEANUP
environment variable is set, evenbrew switch
was unavailable to me this time.I can confirm it happens on a fresh install as well. It seems like a library mismatch. QGIS was built with older versions of PROJ and GDAL. It’s expecting
libproj.13.dylib
andlibgdal.20.dylib
, however both of those packages have been upgraded tolibproj.15.dylib
andlibgdal.26.dylib
.It happened, despite the will to control all the workflow, moving every dependency under one tap, against the efforts and the will of the meritorious contributors to this tap, it happened. I think something is due to the model, the rolling version, that is the reason for Homebrew, something is due to the absence of a software automation testing. Anyway there is a logic failure that is worsened by the general authoritative approach of the leading Homebrew members. The “fork” of some of the formulas began with the decision that everything should be upgraded to Qt 5 that became the new Qt while Qt 4 was deprecated and evicted from the core repository. Anyway, still thanking all the group, I think Rob is right, keeping all the eggs under one hen doesn’t seem a solution per se and it’s not a substitute for automated software management. This said, what’s next? Version 3.8.3 should find it’s way out with with GDAL 3.1 and proj 6 before version 3.10? A proper (temporary?) substitution is the official installer (by Lutra, based on Homebrew) or KingChaos’ one (more advanced, already to version 3.8.3).
On Wed, Oct 9, 2019 at 6:28 PM Rob Howard notifications@github.com wrote:
–
Carlo A. Bertelli Charta servizi e sistemi per il territorio e la storia ambientale srl Dipendenze del palazzo Doria, vc. alla Chiesa della Maddalena 9/2 16124 Genova (Italy) tel./fax +39(0)10 2475439 +39 0108566195 mobile:+39 393 1590711 e-mail: bertelli@chartasrl.eu http://www.chartasrl.eu
@varoudis
osgeo-qgis
is being updated these days and it shouldn’t take much longer. In the meantime, you could try the cask version as a workaround in order to get the toolbox working:brew cask install qgis
.I dont believe this works anymore. It did work for me with two systems, 2 weeks ago, but now I still get an error on another machine.
dyld: Library not loaded: /usr/local/opt/spatialindex/lib/libspatialindex.5.dylib Referenced from: /usr/local/Cellar/osgeo-qgis/3.8.0_1/QGIS.app/Contents/MacOS/./QGIS Reason: image not found fish: './QGIS' terminated by signal SIGABRT (Abort)
Alternatively, you can usually just download the old bottles directly: https://bottle.download.osgeo.org
As far as I can tell, older bottles are kept around for at least a few versions. I find that, if I have to install an older version, it’s cleanest to install from the prior version’s formula, which you can do by providing the raw version from a previous commit. Doing so in this case, homebrew just poured the 2.4.1 bottle from the bottles URL and I was good to go.
@songololo This tap predates the cask version, which was release in late 2018. Before that, the tap was probably the easiest way to get QGIS running in macOS and keep it updated. As for now and as far as I understand, the cask version is based in the homebrew tap, so there isn’t a big difference and both should have the same update pace too. It’s true the cask version is ahead now though.
I would say the advantage of the package over the tap is the installation process, which is quite straight and you don’t need to care about dependencies. You can read more in this QGIS blog entry.
Thanks. Its ok for now (at least on my Macs) thanks to the team for all the hard work
Something like this should downgrade spatialindex back to v1.9.0 from current v1.9.3…
Thanks to @jonathanmccormack, it has been possible to get a new installation up and running.
Thanks to the creators and maintainers for making this tap available.
Per the above comments and ongoing brew chaos, is there anyway to create a stable Formula somewhere so that we can reliably install QGIS without constantly running into new issues?
Hi folks, big fan of the the osgeo homebrew qgis keg…any chance you could provide a rough estimate when those dependencies will be update? Also, is there anything someone who has this issue but isn’t a software development pro can do to help? Thanks again for all of your hard work on this!
Thank you @jonathanmccormack it worked! I took another error while opening QGIS, but it is about “processing toolbox”. Even error was occured, QGIS was opened.
@jonathanmccormack I agree with you that we should find a way to release all upgraded packages at the same time or to keep older versions available until deployment is completed in order to avoid these issues. If not, it can be challenging to use the tap in production.
I could upload poured versions from Mojave so you could manually uncompress them in their respective directories and then run
brew switch
. Just let me know if you interested in and which packages you would need.You are right. We are in the middle of the upgrade process to new Proj and GDAL versions, so we’ll get these issues until all packages are successfully done.