Core: Can't install .NET core on Ubuntu 17

Created on 24 May 2018  路  6Comments  路  Source: dotnet/core

admin@ns532585:~$ sudo apt-get install dotnet-sdk-2.1.200
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 ran all of the commands in order from https://www.microsoft.com/net/learn/get-started/linux/ubuntu16-04

Most helpful comment

Fixed with the following:
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7ubuntu0.4_amd64.deb -P /tmp/
sudo dpkg -i /tmp/libicu55_55.1-7ubuntu0.4_amd64.deb

All 6 comments

dotnet-sdk-2.1.200 : Depends: dotnet-runtime-2.0.7 but it is not going to be installed

What happens when you try to install that package? I.e. sudo apt-get install dotnet-runtime-2.0.7. If there's a similar error again, try to follow the chain until you arrive at a package that gives you a different error.

admin@ns532585:~$ sudo apt-get install dotnet-runtime-2.0.7 [sudo] password for admin:
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-2.0.7 : Depends: libicu55 but it is not installable Depends: dotnet-hostfxr-2.0.7 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

admin@ns532585:~$ sudo apt-get install libicu55
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libicu55 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libicu55' has no installation candidate

Actually i have Ubuntu 17.10

Fixed with the following:
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7ubuntu0.4_amd64.deb -P /tmp/
sudo dpkg -i /tmp/libicu55_55.1-7ubuntu0.4_amd64.deb

maybe it should be updated to use libicu57 instead of libicu55

As far as I can tell, the Ubuntu 17.10 version of the package does depend on libicu57:

$ wget https://packages.microsoft.com/ubuntu/17.10/prod/pool/main/d/dotnet-runtime-2.0.7/dotnet-runtime-2.0.7-ubuntu.17.10-x64.deb
$ dpkg -I dotnet-runtime-2.0.7-ubuntu.17.10-x64.deb
 new debian package, version 2.0.
 size 17984388 bytes: control archive=6003 bytes.
     931 bytes,    11 lines      control
   20117 bytes,   176 lines      md5sums
 Package: dotnet-runtime-2.0.7
 Version: 2.0.7-1
 Architecture: amd64
 Maintainer: Microsoft <[email protected]>
 Installed-Size: 59473
 Depends: libc6 (>= 2.14), libcurl3 (>= 7.16.2), libgcc1 (>= 1:3.0), libgssapi-krb5-2 (>=
1.14+dfsg), liblttng-ust0 (>= 2.5.0), libstdc++6 (>= 4.8), libunwind8, libuuid1 (>= 2.16),
zlib1g (>= 1:1.1.4), libssl1.0.0, libicu57, dotnet-hostfxr-2.0.7
 Section: libs
 Priority: standard
 Homepage: https://dotnet.github.io
 Description: Microsoft .NET Core Runtime - 2.0.7 Microsoft.NETCore.App 2.0.7
  .NET Core is a development platform that you can use to build command-line applications,
microservices and modern websites. It is open source, cross-platform and is supported by
Microsoft. We hope you enjoy using it! If you do, please consider joining the active
community of developers that are contributing to the project on GitHub
(https://github.com/dotnet/core). We happily accept issues and PRs.

I think what you should do is to uninstall the Ubuntu 16.04 version of packages-microsoft-prod and install the Ubuntu 17.10 version of that package. (And don't forget to run sudo apt update after doing that.)

Was this page helpful?
0 / 5 - 0 ratings