curiosity-ai / rocksdb-sharp

.net bindings for the rocksdb by facebook
BSD 2-Clause "Simplified" License
155 stars 38 forks source link

Runtime failed with Ubuntu 20.04.1 LTS #9

Closed LGouellec closed 3 years ago

LGouellec commented 3 years ago

Hi, I'm using your package in ubuntu (with .Net core 3.1) and mcr.microsoft.com/dotnet/core/sdk:3.1 docker image, and I have similar problems.

At runtime, when I want using RocksDb instance, I have this exception :

Error Message:
   System.TypeInitializationException : The type initializer for 'RocksDbSharp.Native' threw an exception.
  ----> NativeImport.NativeLoadException : Unable to locate rocksdb native library, either install it, or use RocksDbNative nuget package
Searched:
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native/librocksdb-6.17.3.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native/librocksdb-6.17.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native/librocksdb-6.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native/librocksdb.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/native/amd64/librocksdb-6.17.3.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/native/amd64/librocksdb-6.17.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/native/amd64/librocksdb-6.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/native/amd64/librocksdb.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/native/librocksdb-6.17.3.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/native/librocksdb-6.17.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/native/librocksdb-6.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/native/librocksdb.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/amd64/librocksdb-6.17.3.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/amd64/librocksdb-6.17.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/amd64/librocksdb-6.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/amd64/librocksdb.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/librocksdb-6.17.3.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/librocksdb-6.17.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/librocksdb-6.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
/root/project/test/Streamiz.Kafka.Net.Tests/bin/Debug/netcoreapp3.1/librocksdb.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
librocksdb-6.17.3.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
librocksdb-6.17.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
librocksdb-6.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or director
y
librocksdb.so: (DllNotFoundException) Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
LGouellec commented 3 years ago

Don't mind, I forgot to install libsnappy & zlib

LGouellec commented 3 years ago

For ubuntu libsnappy & zlib solve the problem, with docker mcr.microsoft.com/dotnet/core/sdk:3.1 image KO.

Are some depency missed ? I install libc6-dev, libgflags-dev, libsnappy-dev,zlib1g-dev, libbz2-dev, liblz4-dev & libzstd-dev.

LGouellec commented 3 years ago

For .net core sdk 3.1, based on Alpine 3.13 :

Installed these depencies solved my problem :

apt install -y libc6-dev libgflags-dev libsnappy-dev zlib1g-devlibbz2-dev liblz4-dev libzstd-dev
apt install -y bzip2 lz4 librocksdb-dev 
smariussorin commented 2 years ago

I used for net core sdk 2.2

apt install -y libc6-dev libgflags-dev libsnappy-dev liblz4-dev libzstd-dev apt install -y bzip2 librocksdb-dev

@LGouellec thanks for the hints.

zlib1g-devlibbz2-dev & lz4 cannot be found