Running .NET Core RC2 on Fedora 23

If you want to try the latest and greatest of .NET Core on your Fedora machine you will be sad to hear that there isn’t a package available at the official website yet (Fedora support is coming):

Luckily with some strace magic and a package from CentOS repository it is very easy to set it up.

First let’s download the CentOS package from the official storage and unpack it:

mkdir ~/dotnet
cd ~/dotnet
tar xf dotnet-dev-centos-x64.1.0.0-preview1-002702.tar.gz
rm dotnet-dev-centos-x64.1.0.0-preview1-002702.tar.gz

And you’re done! There is a dotnet executable file which you can try to run but sadly it won’t work just yet…

[fedora@localhost dotnet]$ ./dotnet --version
Failed to initialize CoreCLR, HRESULT: 0x80131500

I tried to look for solutions on the GitHub issues page, but haven’t found any, so I used strace to see what is wrong. I suspected that there is a missing library for dotnet to work and I was right. A lot of missing libraries for globalization. It turns out that the CentOS dotnet package expects libicu version to be 50 where in Fedora it is version 54 already. It’s an easy fix though, just download the CentOS package and extract it, it won’t break the other version.

cd ~/dotnet
cd /
sudo rpm2cpio ~/dotnet/libicu-50.1.2-15.el7.x86_64.rpm | sudo cpio -idmv
rm ~/dotnet/libicu-50.1.2-15.el7.x86_64.rpm
cd ~/dotnet

At this point everything should be working, only thing you should do is make a symbolic link to the executable with:

sudo ln -s ~/dotnet/dotnet /usr/local/bin/dotnet

And then you are ready!

mkdir ~/App1 
cd ~/App1
dotnet new
dotnet restore
dotnet run

If you want to try ASP.NET there is a nice guide here:

Thanks for reading!
Have fun!


Now read this

Anyfed (Universal Fedora chroot tool) - First release

A small update. I wrote a small shell script which can set up a Fedora chroot anywhere (get the name now?) where a compatible kernel is. This means you can use minimal Fedora shell on almost any other Linux distribution. Here is the... Continue →