DotNetCore App on Ubuntu: you need libunwind8

DotNetCore provides two types of installs: framework-dependent install and self-contained install.

I tried to compile a hello-world app on Windows and run it on Ubuntu that has neither dotnetcore SDK nor dotnetcore runtime.
With the original Visual Studio 2017 and dotnetcore 1.1 it did not work, even on Windows. Published folder for “complete” app did not even contain an executable file. I had better luck once I upgraded to Visual Studio 2017 version 15.3 and dotnetcore 2.0. The package is 65M uncrompessed, but heck, it contains the whole framework, so that was kind of expected.

Two small notes:

– I had to mark all files in the app directory as runnable (chmod 755 *). Making only the app file runnable did not work. I was lazy and just updated them all.

– Initially I received this weird error:

Failed to load �a�, error: libunwind.so.8: cannot open shared object file: No such file or directory
Failed to bind to CoreCLR at '/home/ikriv/bin/dnc/libcoreclr.so'

Three squiggle characters after “Failed to load” were indeed garbage. I searched the net and found that per https://github.com/dotnet/cli/issues/3390 one needs to install libunwind8 package, or else .NET apps won’t work.

sudo apt-get install libunwind8

did the trick. I wish, however, that the runtime were more explicit about the dependencies it needs.

Overall, the experience with dotnetcore 2.0 was not so bad, I’d say 4 stars out of 5.
Dotnetcore 1.1 gets zero stars, since “complete” setup was hopelessly broken, even on Windows.

Leave a Reply

Your email address will not be published. Required fields are marked *