Cannot install .NET Core on Ubuntu Bionic Beaver

Solution 1:

first add the sources:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list 
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list

after that:

sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1.200

sudo apt-get update is important

source: https://www.microsoft.com/net/learn/get-started/linux/ubuntu18-04

Solution 2:

After installing libicu55, you need to install the other package dependencies that won't install on their own:

sudo apt-get install dotnet-runtime-deps-2.2
sudo apt-get install dotnet-runtime-2.2
sudo apt-get install aspnetcore-runtime-2.2

Then sudo apt=get install dotnet-sdk-2.x