Sdk: dotnet-sdk-2.1 fails to install on Ubuntu Server 18.04.1

Created on 22 Aug 2018  路  10Comments  路  Source: dotnet/sdk

Steps to reproduce

Follow instructions at https://www.microsoft.com/net/download/linux-package-manager/ubuntu18-04/sdk-2.1.401:

$ wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb

$ sudo dpkg -i packages-microsoft-prod.deb
Selecting previously unselected package packages-microsoft-prod.
(Reading database ... 102222 files and directories currently installed.)
Preparing to unpack packages-microsoft-prod.deb ...
Unpacking packages-microsoft-prod (1.0-ubuntu18.04.1) ...
Setting up packages-microsoft-prod (1.0-ubuntu18.04.1) ...

$ sudo apt-get install apt-transport-https
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'apt' instead of 'apt-transport-https'
apt is already the newest version (1.6.3ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo apt-get update
Get:1 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease [2,846 B]
Get:2 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages [21.0 kB]
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Fetched 23.8 kB in 1s (35.2 kB/s)
Reading package lists... Done

$ sudo apt-get install dotnet-sdk-2.1
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 : Depends: dotnet-runtime-2.1 (>= 2.1.3) but it is not going to be installed
                  Depends: aspnetcore-runtime-2.1 (>= 2.1.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

CC: @leecow

Most helpful comment

Had the same problem on Ubuntu 16.04 and I guess the solution is similar regardless:

sudo apt-get remove libicu57
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7ubuntu0.4_amd64.deb
sudo dpkg -i libicu55_55.1-7ubuntu0.4_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.2g-1ubuntu4.15_amd64.deb
sudo dpkg -i libssl1.0.0_1.0.2g-1ubuntu4.15_amd64.deb
sudo apt-get install dotnet-sdk-2.2

All 10 comments

I've verified that it does install and run fine on 18.04 so need to figure out what dependency you're missing. Try apt install dotnet-runtime-deps-2.1 and let's see if that gives us a clue.

Could you also provide the output from uname -a?

The issue is with package liblttng-ust0:

$ sudo apt install dotnet-runtime-deps-2.1
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-runtime-deps-2.1 : Depends: liblttng-ust0 but it is not installable
E: Unable to correct problems, you have held broken packages.

Perhaps the difference is I'm using Ubuntu 18.04.1, rather than 18.04.0?

$ uname -a
Linux [hostname] 4.15.0-32-generic dotnet/sdk#4312-Ubuntu SMP Fri Aug 10 17:58:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

This appears to be a dup of https://github.com/dotnet/core/issues/1822 (also https://github.com/dotnet/core-setup/issues/4417). The workaround suggested in those issues works for me as well:

sudo add-apt-repository universe

Closing this issue then as it is already being tracked somewhere else. The core-setup issue seems the more appropriate one to me.

Depends: libc6, libgcc1, libgssapi-krb5-2, liblttng-ust0, libstdc++6, zlib1g, libssl1.0.0, libicu55
Ubuntu 18.04 actually has libicu60

Unable to install dotnet core on ubuntu 18.04
sudo apt-get install dotnet-sdk-2.1
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 : Depends: dotnet-runtime-2.1 (>= 2.1.6) but it is not going to be installed
Depends: aspnetcore-runtime-2.1 (>= 2.1.6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

amit@dh77eb-ubuntu18:~$ uname -a
Linux dh77eb-ubuntu18 4.15.0-39-generic dotnet/cli#42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

amit@dh77eb-ubuntu18:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

amit@dh77eb-ubuntu18:~$ sudo add-apt-repository universe
'universe' distribution component is already enabled for all sources.

I have the same issue:

mbalsam@rest1:~$ uname -a
Linux rest1 4.15.0-1030-azure dotnet/sdk#4309-Ubuntu SMP Tue Oct 30 18:35:53 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

mbalsam@rest1:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

mbalsam@rest1:~$ sudo add-apt-repository universe
'universe' distribution component is already enabled for all sources.

mbalsam@rest1:~$ sudo apt-get install apt-transport-https
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-transport-https is already the newest version (1.6.6).
0 upgraded, 0 newly installed, 0 to remove and 36 not upgraded.

mbalsam@rest1:~$ sudo apt-get update
Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done

mbalsam@rest1:~$ sudo apt-get install dotnet-sdk-2.1
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 : Depends: dotnet-runtime-2.1 (>= 2.1.6) but it is not going to be installed
Depends: aspnetcore-runtime-2.1 (>= 2.1.6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Had the same problem on Ubuntu 16.04 and I guess the solution is similar regardless:

sudo apt-get remove libicu57
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7ubuntu0.4_amd64.deb
sudo dpkg -i libicu55_55.1-7ubuntu0.4_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.2g-1ubuntu4.15_amd64.deb
sudo dpkg -i libssl1.0.0_1.0.2g-1ubuntu4.15_amd64.deb
sudo apt-get install dotnet-sdk-2.2
Was this page helpful?
0 / 5 - 0 ratings