CoreyKaylor / Lightning.NET

.NET library for LMDB key-value store
Other
398 stars 82 forks source link

LMDB on .Net core + Linux #71

Closed KarolKolenda closed 8 years ago

KarolKolenda commented 8 years ago

I know that this is not a bug but I really can't get my head around this. How can I get this to work on linux (centos - but I guess it doesn't matter much)? I created a basic .net Core app with lightning.net and on Windows everything works fine - just don't know how to provide native (linux) lmdb.dll equivalent in linux environment. Any help/pointers much appreciated.

CoreyKaylor commented 8 years ago

Have a look at https://github.com/CoreyKaylor/Lightning.NET/blob/master/build.sh#L21

My memory is a bit hazy, but I believe if lmdb.so is on your path it's already a candidate for DllImport, but if not you can use the same technique as the build script so it can find the lib. So you would install the native lib through the OS package manager and point that environment variable wherever that was installed (again if necessary).

KarolKolenda commented 8 years ago

@CoreyKaylor It took me a while - but it does work. I got lmdb via yum like you suggested and tinkered a bit. I had to locate lmdb and rename it to lmdb.so (again, thanks for the clue). I guess it just proves my lack of knowledge re: Linux (I am clueless in this environment): I am sure I can make alias or something similar in the future.

That being said I managed to have it up and running - and it does work brilliantly!

Once again big thank to you - for the library and for your helpful support. You Sir are a genius!