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 wget https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/1.0.0-preview1-002702/dotnet-dev-centos-x18.104.22.168-preview1-002702.tar.gz tar xf dotnet-dev-centos-x22.214.171.124-preview1-002702.tar.gz rm dotnet-dev-centos-x126.96.36.199-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 wget ftp://188.8.131.52/linux/centos/7.2.1511/os/x86_64/Packages/libicu-50.1.2-15.el7.x86_64.rpm 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!