Unable to load shared library 'gdal_wrap' or one of its dependencies
See original GitHub issueI run MaxRev.Gdal.Core + MaxRev.Gdal.LinuxRuntime.Minimal on CentOS 7 with simple code:
return new string[] {
"GDAL Version: " + Gdal.VersionInfo("RELEASE_NAME"),
"GDAL INFO: " + Gdal.VersionInfo("")
};
This code throws an error:
An unhandled exception has occurred while executing the request. System.TypeInitializationException: The type initializer for ‘OSGeo.GDAL.GdalPINVOKE’ threw an exception. —> System.TypeInitializationException: The type initializer for ‘SWIGExceptionHelper’ threw an exception. —> System.DllNotFoundException: Unable to load shared library ‘gdal_wrap’ or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgdal_wrap: cannot open shared object file: No such file or directory
The same code work smoothly on Windows
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Exception while using GDAL in C# - Stack Overflow
The error you are receiving re gdal_wrap.dll is referring to one of its dependencies. I threw that DLL into depends and it found...
Read more >How do I install the GDAL bindings for C#/.NET 4.5.1?
I'm trying to use the C# gdal bindings but I get an error in my C# code which says "Unable to load DLL...
Read more >GDAL Installation Issues
Theses error messages imply that one of our core libraries, GDAL or HDF5, failed to initialize their necessary libraries. This is most likely...
Read more >Problem loading raster package on Rstudio server ...
I do have an issue loading the 'raster' package. The error message: library(raster) Error: package or namespace load failed for 'raster' in dyn....
Read more >Importing GDAL from Nuget Package
I am attempting to import GDAL into Unity. I am using the GDAL library within my own custom class library, which is compiled...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can use older version of the package. For example 3.1.2.110 will work with Ubuntu 18.04. But I agree with @MaxRev-Dev, upgrading Ubuntu would be a wise decision. Not only because of maintenance end. Ubuntu 22.04 has great improvement on caching file reading. Take a look at picture bellow. The same code executed on two VMs. On the left is Ubuntu 18.04 and on the right Ubuntu 22.04. Whatever data you want to utilize using
MaxRev.Gdal
library you will get performance boost by upgrading to Ubuntu 22.04.@BaiC Ubuntu18.04 support window is until April 30, 2023 EOL.
After much thought, I decided to stay on Debian 11. There are several reasons why.
You have several options: