Closed michaeldtaylor closed 2 years ago
I just tried: mcr.microsoft.com/dotnet/core/runtime:3.0-bionic, to see if Ubuntu 18 was any better. If I take the SpatiaLiteLoader out into my own app I can get loading the module by explicitly setting the environment variable:
DYLD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
and doing:
SELECT load_extension('mod_spatialite.so')
@bricelam to find dupe.
Duplicate of #16667
How is this a “duplicate”. This is Debian Linux - not Mac OS. Your solution from that issue certainly isn’t relevant. Is this just fundamentally broken on anything but Windows?
I think it’s an issue with the latest version of PROJ, but I haven’t been able to pin it down
I’m experimenting with building a more minimal version of SpatiaLite that doesn’t reference PROJ. I’m thinking about including Linux and macOS (and maybe iOS and Android) binaries in the NuGet package.
Ok thanks for the clarification. It would be good if the bins could be included and it “just worked”. As I say apt-get version seems broken on Debian 9, but works on Ubuntu 18. You have to love C extensions! Loading a known working version on all Linux distros would be good.
+1 I’m working on including binaries for more platforms over in bricelam/mod_spatialite-NuGet
I have followed the Spatial Data - EF Core (https://docs.microsoft.com/en-us/ef/core/modeling/spatial) instructions to the letter, and the example works perfectly on Windows.
When creating and running on a .NET Core 2.2/3.0 Linux Docker image:
which has also has:
Added to the Dockerfile I get:
The version of libsqlite3-mod-spatialite that gets installed by apt-get is:
in the folder:
Any ideas? I need to be able to generate a SpatiaLite database on a Linux Docker instance.
Steps to reproduce
Dockerfile (final steps only):
Program.cs
PackageReferences:
Further technical details
EF Core version: 2.2.6 (and 3.0.0) Database provider: Microsoft.EntityFrameworkCore.Sqlite Target framework: .NET Core 2.2 (and 3.0) Operating system: Linux (debian.9-x64) IDE: Visual Studio 2019 16.3.1