-
Notifications
You must be signed in to change notification settings - Fork 527
Issues running Kestrel on Linux: System.DllNotFoundException: libdl #78
Comments
Confirming that.. i am not able to run kestrel on debian linux. Libuv is present in version v1.0.0-rc1 but still i get an exception when running kestrel :
any helping ideas? |
I'm running into a similar issue on CentOS 6.5 with Mono 3.12.0:
But libuv.so.1 is present in /usr/lib:
|
Did you try to build libuv by yourself? i did it this way : https://github.com/w41dev/ASPNet5_MonoSetup/blob/master/SetupLibuv.sh on Ubuntu 14.04.2 LTS kestrel works, i got the Problem only on Debian. |
Yes I built it myself. I found the issue. Kestrel looks for |
@acastaner Kestrel itself is not concerned with actually finding the library. Kestrel asks libdl's One of the largest issues with Linux in general is the idiosyncrasies of distributions when it comes to the actual semantics of those rules. If you build libuv yourself, please make sure you follow your distribution's rules of where to store the binaries. There is nothing Kestrel can do to help you with that. |
Hi @acastaner |
@thekane Have a look at Mono's interop documentation. Setting the environment variables also works for the dnx commands: |
Thanks @Tragetaschen I will have a look |
I think this may be an issue in mono (any versions) running on Debian 32-bit. Florian Kummer found out https://bugzilla.xamarin.com/show_bug.cgi?id=4190 I isolated part of the kestrel source code that called libdl For example, the following C# code fails in mono: (it uses [DllImport("libdl")])
I followed Florian's instructions and I created a wrapper for libdl in C, and named it libdl-debian-32-bit. I changed my C# code to use the wrapper ([DllImport("libdl-debian-32-bit")]) and "it worked".
This is how I created the wrapper libdl-debian-32-bit.c :
I said "it worked" because it didn't crash when opening libuv. Any help will be appreciated. I am a newbie and I have been enjoying Debian. |
We'll investigate this in beta8 and see if it's still an issue. |
I can't repo this scenario on Ubunto 14.04 with Mono 4.0.4 and our 1.0.0-beta8 bits. |
@w41dev @thekane @Tragetaschen @acastaner this issue was filed a few months back. I retried the scenario following our Guide for installing ASP.NET 5 on Linux would you please, give it a try? I can't repo this issue with
If you find this issue to be reproducible on a specific platform, please feel free to reopen this issue and let me know the config. |
Hi @troydai I gave it a try yesterday. This is my configuration:
I got the same result as described on July 8 (running dnx + kestrel on mono).
|
Greetings, I solved it by creating symbolic links to the correct location (Expected by Kestrel): ln -s /usr/lib64/libdl.so.2 /usr/lib64/libdl You can see this thread: http://stackoverflow.com/questions/31855031/how-do-i-install-netcore-on-centos-machine |
I have same problem like user thekane. I tried CamiloBernal solution (with lib not lib64), but it didn´t help. Any ideas? |
@BeranekCZ did you run |
Hi @BeranekCZ What operating system are you using? |
@BeranekCZ did you try lib64 as well? |
I have Debian 8.2 (jessie), ASP.NET beta 8, mono 4.0.4. So same things as thekane. I tried ldconfig now, but error is still here. It is 32bit OS, so lib64 is not here. |
Thanks for your reply @BeranekCZ Seems to me this is an issue in mono not supporting debian 32-bit. I think I will have to switch to ubuntu 32-bit immediately. Eventually I will need to get a 64-bit PC to use debian (because coreclr won't support 32-bit anyway). |
On CentOS 7 x86_64, got this problem too (System.DllNotFoundException: libuv). |
Not sure if anybody noticed (I did only yesterday) but the documentation now includes installation instruction for Red Hat and derivatives and does mention the creation of the simlink: I hope someday we'll get a RPM for that, but in the meantime the steps in the documentation work nicely (on CentOS 6 anyway, I haven't tried CentOS 7). |
Yeah, the documentation now has the right instructions. Acquisition on Linux is a little tricky because of the various differences between distros and even version differences between the same distro. |
"ln -s /usr/local/lib/libuv.so /usr/lib64/libuv.so.1" is not working for me, as described in the documentation. I still have the "System.DllNotFoundException: libuv" error when I try to start Kestrel. |
@michaudg That's on CentOS 7? @danroth27 A good data point to add to the doc. |
@muratg CentOS 7.1 |
Closing this since it's distro specific, there are workarounds, and the library search path is not Kestrel's concern. |
Looks like folks are having issues running Kestrel on Linux: dotnet/aspnetcore#172
The text was updated successfully, but these errors were encountered: