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):

https://www.microsoft.com/net/download

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-x64.1.0.0-preview1-002702.tar.gz
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
wget ftp://195.220.108.108/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:

https://docs.asp.net/en/latest/getting-started.html

Thanks for reading!
Have fun!

 
40
Kudos
 
40
Kudos

Now read this

Running Fedora 23 Workstation Linux on an Intel BayTrail tablet

In my recent projects I’ve managed to run Fedora (for fun) on pretty much everything including: My phone (see my other post about GNURoot) NVIDIA Optimus laptop Raspberry Pi 2 (armhfp 23 with LXDE works great for me) Azure Virtual... Continue →