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

Nuget package does not install the rocksdb.dll (dotnet core) #43

Open
angshuman opened this issue Mar 10, 2018 · 4 comments
Open

Nuget package does not install the rocksdb.dll (dotnet core) #43

angshuman opened this issue Mar 10, 2018 · 4 comments

Comments

@angshuman
Copy link

C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample>dotnet run

Unhandled Exception: 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:C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\native\amd64\rocksdb-5.4.6.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\native\amd64\rocksdb-5.4.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\native\amd64\rocksdb-5.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\native\amd64\rocksdb.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\native\rocksdb-5.4.6.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\native\rocksdb-5.4.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\native\rocksdb-5.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\native\rocksdb.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\amd64\rocksdb-5.4.6.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\amd64\rocksdb-5.4.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\amd64\rocksdb-5.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\amd64\rocksdb.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\rocksdb-5.4.6.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\rocksdb-5.4.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\rocksdb-5.dll: (Win32Exception) The specified module could not be found
C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\bin\Debug\netcoreapp2.0\rocksdb.dll: (Win32Exception) The specified module could not be found
rocksdb-5.4.6.dll: (Win32Exception) The specified module could not be found
rocksdb-5.4.dll: (Win32Exception) The specified module could not be found
rocksdb-5.dll: (Win32Exception) The specified module could not be found
rocksdb.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\native\amd64\rocksdb-5.4.6.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\native\amd64\rocksdb-5.4.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\native\amd64\rocksdb-5.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\native\amd64\rocksdb.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\native\rocksdb-5.4.6.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\native\rocksdb-5.4.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\native\rocksdb-5.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\native\rocksdb.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\amd64\rocksdb-5.4.6.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\amd64\rocksdb-5.4.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\amd64\rocksdb-5.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\amd64\rocksdb.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\rocksdb-5.4.6.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\rocksdb-5.4.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\rocksdb-5.dll: (Win32Exception) The specified module could not be found
C:\Users\asarkar.nuget\packages\rocksdbsharp\5.4.6\lib\netstandard1.6\rocksdb.dll: (Win32Exception) The specified module could not be found
rocksdb-5.4.6.dll: (Win32Exception) The specified module could not be found
rocksdb-5.4.dll: (Win32Exception) The specified module could not be found
rocksdb-5.dll: (Win32Exception) The specified module could not be found
rocksdb.dll: (Win32Exception) The specified module could not be found
at NativeImport.Importers.Import[T](INativeLibImporter importer, String libName, String version, Boolean suppressUnload)
at NativeImport.Auto.Import[T](String name, String version, Boolean suppressUnload) in C:\Users\wfalk\source\rocksdb-sharp\RocksDbSharp\AutoNativeImport.cs:line 39
at RocksDbSharp.Native..cctor() in C:\Users\wfalk\source\rocksdb-sharp\RocksDbSharp\Native.Load.cs:line 18
--- End of inner exception stack trace ---
at RocksDbSharp.BlockBasedTableOptions..ctor() in C:\Users\wfalk\source\rocksdb-sharp\RocksDbSharp\BlockBasedTableOptions.cs:line 18
at PrefixExample.Program.Main(String[] args) in C:\code\RulesLmdb\rocksdb-sharp\examples\PrefixExample\Program.cs:line 15

@warrenfalk
Copy link
Owner

Which nuget package? The error message you pasted says this:

NativeImport.NativeLoadException: Unable to locate rocksdb native library, either install it, or use RocksDbNative nuget package

I'm assuming you didn't install the library on the target system, so then did you add the nuget package containing the native dll?

@DaweiCai
Copy link

I met the same issue. Local build passed, but when publish the pkg to azure, it failed. Any update?

@syedhassaanahmed
Copy link

syedhassaanahmed commented Nov 17, 2018

I have a .NET Core 2.1 Console App which references both NuGet packages RocksDbSharp and RocksDbNative. The app locally builds and runs fine, however when built and executed in .NET Core Linux containers (Ubuntu and Alpine), I'm getting the above exception at runtime. Any ideas how to fix that?

@syedhassaanahmed
Copy link

Update: On Ubuntu-based .NET Core 2.1 runtime images, libc6-dev is required in addition to libsnappy-dev. Alpine 3.7 based images are a dead-end right now due to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants