Core: Install dotnet-sdk-3.1 on WSL with Ubuntu 20.04 tells me "Unable to correct problems, you have held broken packages"

Created on 25 Apr 2020  路  10Comments  路  Source: dotnet/core

have followed this documentation to try to install dotnet sdk 3.1 on WSL (Ubuntu 20.04): https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-2004. I get an error saying I have broken packages.

I am on

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal

On wsl 1 (I think, when running wsl -v or wsl --version in a powershell, it gives me nothing.). My Windows information is:

  1. version is 10.0.18363 Build 18363
  2. OS Name: Microsoft Windows 10 Pro

I have done these steps:

  1. wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
  2. sudo dpkg -i packages-microsoft-prod.deb
  3. sudo apt-get update
  4. sudo apt-get install apt-transport-https
  5. sudo apt-get update
  6. sudo apt-get install dotnet-sdk-3.1

When I run step 6, i get this error

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

If i step "down the line" doing: sudo apt install dotnet-runtime-3.1
Which throws this error:

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

Then doing this: sudo apt install dotnet-runtime-3.1 which gives me this error

$ sudo apt install dotnet-runtime-3.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-3.1 : Depends: dotnet-runtime-deps-3.1 (>= 3.1.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
[mslot@Voyager MartinSlot]$ sudo apt install dotnet-runtime-deps-3.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-3.1 : Depends: libicu but it is not installable or
libicu63 but it is not installable or
libicu60 but it is not installable or
libicu57 but it is not installable or
libicu55 but it is not installable or
libicu52 but it is not installable
E: Unable to correct problems, you have held broken packages.

It can't install the correct libicu. I haven't tried to install one of the icu libraries, because i dont know which to install.

Is this not possible when running Ubuntu 20.04 on WSL 1 on Windows 10? Or am I missing something?

area-setup duplicate

Most helpful comment

After manually finding libicu here http://ftp.us.debian.org/debian/pool/main/i/icu/, and fetching this version: libicu57_57.1-6+deb9u4_amd64.deb and installing it, apt now installs dotnet-sdk-3.1.

Steps:

  1. wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u4_amd64.deb
  2. sudo dpkg -i libicu57_57.1-6+deb9u4_amd64.deb
  3. sudo apt install dotnet-sdk-3.1
$ dotnet --version
3.1.201

I actually first tried to do

  1. wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu67_67.1-1_amd64.deb
  2. sudo dpkg -i libicu67_67.1-1_amd64.deb

which gave me same error as mentioned in the issue "you have held broken packages".

Is there any reason why this isn't mentioned somehow, in the documentation under "Troubleshooting the package manager": https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-2004#troubleshoot-the-package-manager?

Am I doing something wrong? I would like, still to know.

All 10 comments

After manually finding libicu here http://ftp.us.debian.org/debian/pool/main/i/icu/, and fetching this version: libicu57_57.1-6+deb9u4_amd64.deb and installing it, apt now installs dotnet-sdk-3.1.

Steps:

  1. wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u4_amd64.deb
  2. sudo dpkg -i libicu57_57.1-6+deb9u4_amd64.deb
  3. sudo apt install dotnet-sdk-3.1
$ dotnet --version
3.1.201

I actually first tried to do

  1. wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu67_67.1-1_amd64.deb
  2. sudo dpkg -i libicu67_67.1-1_amd64.deb

which gave me same error as mentioned in the issue "you have held broken packages".

Is there any reason why this isn't mentioned somehow, in the documentation under "Troubleshooting the package manager": https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-2004#troubleshoot-the-package-manager?

Am I doing something wrong? I would like, still to know.

@leecow can you take a look at this issue?

We don't have packages published yet that support 20.04, there are some workarounds in https://github.com/dotnet/core/issues/4360.

After manually finding libicu here http://ftp.us.debian.org/debian/pool/main/i/icu/, and fetching this version: libicu57_57.1-6+deb9u4_amd64.deb and installing it, apt now installs dotnet-sdk-3.1.

Steps:

1. `wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u4_amd64.deb `

2. `sudo dpkg -i libicu57_57.1-6+deb9u4_amd64.deb`

3. `sudo apt install dotnet-sdk-3.1`
$ dotnet --version
3.1.201

I actually first tried to do

1. `wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu67_67.1-1_amd64.deb`

2. `sudo dpkg -i libicu67_67.1-1_amd64.deb`

which gave me same error as mentioned in the issue "you have held broken packages".

Is there any reason why this isn't mentioned somehow, in the documentation under "Troubleshooting the package manager": https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-2004#troubleshoot-the-package-manager?

> Am I doing something wrong? I would like, still to know.

first option worked for me..!! NICE!!!!! :) :)

@mslot Your fix worked perfectly. Thank you!

@mslot Works fine! +1

After manually finding libicu here http://ftp.us.debian.org/debian/pool/main/i/icu/, and fetching this version: libicu57_57.1-6+deb9u4_amd64.deb and installing it, apt now installs dotnet-sdk-3.1.

Steps:

1. `wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u4_amd64.deb `

2. `sudo dpkg -i libicu57_57.1-6+deb9u4_amd64.deb`

3. `sudo apt install dotnet-sdk-3.1`
$ dotnet --version
3.1.201

I actually first tried to do

1. `wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu67_67.1-1_amd64.deb`

2. `sudo dpkg -i libicu67_67.1-1_amd64.deb`

which gave me same error as mentioned in the issue "you have held broken packages".

Is there any reason why this isn't mentioned somehow, in the documentation under "Troubleshooting the package manager": https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-2004#troubleshoot-the-package-manager?

Am I doing something wrong? I would like, still to know.

Works for me on Win10 WSL~~馃憤

After manually finding libicu here http://ftp.us.debian.org/debian/pool/main/i/icu/, and fetching this version: libicu57_57.1-6+deb9u4_amd64.deb and installing it, apt now installs dotnet-sdk-3.1.

Coming from a Debian bullseye system, this workaround works fine, just to point out though, I've noticed some CVEs with that version:

```
CVE-2020-10531: [Medium]
Found in: icu [57.1-6+deb9u4]
Fixed By: 63.2-3
An issue was discovered in International Components for Unicode (ICU) for C/C++ through 66.1. An integer overflow, leading to a heap-based buffer overflow, exists in the UnicodeString::doAppend() function in common/unistr.cpp.
https://security-tracker.debian.org/tracker/CVE-2020-10531


CVE-2017-15422: [Medium]
Found in: icu [57.1-6+deb9u4]
Fixed By: 57.1-9
Integer overflow in international date handling in International Components for Unicode (ICU) for C/C++ before 60.1, as used in V8 in Google Chrome prior to 63.0.3239.84 and other products, allowed a remote attacker to perform an out of bounds memory read via a crafted HTML page.
https://security-tracker.debian.org/tracker/CVE-2017-15422


CVE-2017-14952: [High]
Found in: icu [57.1-6+deb9u4]
Fixed By: 57.1-7
Double free in i18n/zonemeta.cpp in International Components for Unicode (ICU) for C/C++ through 59.1 allows remote attackers to execute arbitrary code via a crafted string, aka a "redundant UVector entry clean up function call" issue.
https://security-tracker.debian.org/tracker/CVE-2017-14952


```

But libicu63_63.2-3 is also available and compatible with dotnet, too:

  1. wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu63_63.2-3_amd64.deb
  2. sudo dpkg -i libicu63_63.2-3_amd64.deb
  3. sudo apt install dotnet-sdk-3.1

@mslot Perfect, your fix worked for me as well

Was this page helpful?
0 / 5 - 0 ratings