runtime: Can't install latest dotnet-sdk in Windows Subsystem for Linux
Steps to reproduce
-
Install older .NET SDK (in my case I have a working 2.1.0-rc1 though I believe we’ve seen similar issues with older versions prior to 2.1 and trying to upgrade those as well. Those issues only resolved with using aptitude, though I haven’t done that yet on this system)
-
Try to install the latest as per: https://www.microsoft.com/net/learn/get-started/linux/ubuntu16-04
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb sudo apt-get install apt-transport-https sudo apt-get update sudo apt-get install dotnet-sdk-2.1
Expected behavior
2.1 should install 😃
Actual behavior
Fails on the install dotnet-sdk-2.1 command
adam@home:/mnt/c/Users/Adam$ sudo apt-get install dotnet-runtime-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-2.1 : Depends: dotnet-runtime-deps-2.1 (>= 2.1.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Environment data
Windows 10 Pro - 17134 (and prior) Ubuntu 16.04 Windows subsystem that seemingly has been working ok
dotnet --info returns the following
`.NET Core SDK (reflecting any global.json): Version: 2.1.300-rc1-008673 Commit: f5e3ddbe73
Runtime Environment: OS Name: ubuntu OS Version: 16.04 OS Platform: Linux RID: ubuntu.16.04-x64 Base Path: /usr/share/dotnet/sdk/2.1.300-rc1-008673/
Host (useful for support): Version: 2.1.0-rc1 Commit: eb9bc92051
.NET Core SDKs installed: 1.0.4 [/usr/share/dotnet/sdk] 2.1.4 [/usr/share/dotnet/sdk] 2.1.300-rc1-008673 [/usr/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0-rc1-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0-rc1-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 1.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 1.1.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0-preview1-26216-03 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0-rc1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download adam@home:/mnt/c/Users/Adam$ dotnet --info .NET Core SDK (reflecting any global.json): Version: 2.1.300-rc1-008673 Commit: f5e3ddbe73
Runtime Environment: OS Name: ubuntu OS Version: 16.04 OS Platform: Linux RID: ubuntu.16.04-x64 Base Path: /usr/share/dotnet/sdk/2.1.300-rc1-008673/
Host (useful for support): Version: 2.1.0-rc1 Commit: eb9bc92051
.NET Core SDKs installed: 1.0.4 [/usr/share/dotnet/sdk] 2.1.4 [/usr/share/dotnet/sdk] 2.1.300-rc1-008673 [/usr/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0-rc1-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0-rc1-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 1.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 1.1.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0-preview1-26216-03 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0-rc1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
`
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 25 (4 by maintainers)
This answer worked for me, but I had to break step 3 into to parts: 3a. wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu60_60.2-6ubuntu1_amd64.deb 3b. sudo dpkg -i libicu60_60.2-6ubuntu1_amd64.deb
To get it to install on Ubuntu 18.04 I had to run the following before attempting the dotnet-sdk-2.1 install: wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb sudo sudo dpkg -i libicu55_55.1-7_amd64.deb
Installing libicu60 didn’t resolve the missing dependency for me.
fixed for ubuntu server 18.04 for dotnet-sdk-2.1
wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu60_60.2-6ubuntu1_amd64.deb dpkg -i libicu60_60.2-6ubuntu1_amd64.deb
(if you need other version of libicu, just found it in http://mirrors.edge.kernel.org/ubuntu/pool/main/i/icu/)
apt-get install dotnet-sdk-2.1
works!today installed 2.1.302 version thx all!
Fixed my issue above
Found this: No installation candidate for “libicu52” on 15.10
Ran
Then
dotnet
Looks like some package wiring was missing, but specifying a few transitive deps explicitly seemed to work for me…
I also had the same error as CoskunSunali. …
Are not these additional steps better to be a part of the documentation at https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/sdk-2.2.105 or even better set as dependencies so
apt
orapt-get
installs them automatically?It is 2019 and we have to search through Google to figure out how to install dotnet-sdk using a package manager. Feels sad.
By the way, even after invoking the workaround commands, it fails.
@EdenRidgway thanks! your solution worked for me. sudo wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb
Actually this version is what solves the issue for ubuntu 18.
I am having this same issue–I have rc1 installed (using aptitude because apt-get failed) and am now attempting to install 2.1 using
sudo apt-get install dotnet-sdk-2.1
. This errored out with the same message on both my laptop (Surface) and my personal desktop (also Windows) on Ubuntu/bash. As noted above, worked fine using aptitude, a solution proposed in this post by someone having the same problem: https://askubuntu.com/questions/363200/e-unable-to-correct-problems-you-have-held-broken-packages/451078. While this is a functional workaround, it would be nice to know what is going on here as it seems like the problem is occurring for a number of WSL users.