1

I'm currently trying to install .NET Core on Ubuntu 18.04 following these instructions. But I always get the following message:

me@mine-Ubuntu:~$ sudo apt-get install -y dotnet-sdk-2.1.200
[sudo] password for me: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dotnet-sdk-2.1.200 : Depends: dotnet-runtime-2.0.7 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I've found some posts about this issue but no help. I hope to get some proper information here.

4 Answers 4

6

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

1
1

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

0

Register Microsoft key and feed

Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.

Open a terminal and run the following commands:

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
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list

Install .NET SDK

Update the products available for installation, then install the .NET SDK.

In your terminal, run the following commands:

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

Source - https://www.microsoft.com/net/download/linux-package-manager/rhel/sdk-current

4
  • Thank you, but it's still not working. Errors are the same.
    – MarcoB
    Jun 21, 2018 at 9:24
  • Try running 'sudo apt-get update' and 'sudo apt-get upgrade'. Then try to run the commands that i posted.
    – Nishan
    Jun 22, 2018 at 6:50
  • Same issue. Still not working
    – MarcoB
    Jul 21, 2018 at 7:56
  • I am also facing same issue :( Oct 16, 2018 at 7:55
-1

You need to install libicu55:

sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt-get update
sudo apt-get install libicu55

And then install net core:

sudo apt-get install dotnet-sdk-2.1
1
  • The addition of repositories from a different release (without proper priority rules) is asking for trouble. Also I don't see how libicu55 affects the situation at hand. -1 Nov 3, 2018 at 7:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .