Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mslot opened this issue Apr 25, 2020 · 11 comments
Labels
area-setup Issues related to installing .NET Core duplicate Indicates duplicate issues

Comments

@mslot
Copy link

mslot commented Apr 25, 2020

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?

@mslot
Copy link
Author

mslot commented Apr 25, 2020

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.

@mairaw mairaw added the area-setup Issues related to installing .NET Core label Apr 25, 2020
@mairaw
Copy link
Contributor

mairaw commented Apr 25, 2020

@leecow can you take a look at this issue?

@dagood
Copy link
Member

dagood commented Apr 25, 2020

We don't have packages published yet that support 20.04, there are some workarounds in #4360.

@dagood
Copy link
Member

dagood commented Apr 25, 2020

Duplicate of #4360

@dagood dagood marked this as a duplicate of #4360 Apr 25, 2020
@dagood dagood closed this as completed Apr 25, 2020
@Dutchglory
Copy link

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!!!!! :) :)

@WoofahRayetCode
Copy link

@mslot Your fix worked perfectly. Thank you!

@shubham-vunet
Copy link

@mslot Works fine! +1

@zoujia
Copy link

zoujia commented May 12, 2020

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~~👍

@dschafhauser
Copy link

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

@Robsay
Copy link

Robsay commented Oct 5, 2020

@mslot Perfect, your fix worked for me as well

@neogenz
Copy link

neogenz commented Mar 16, 2021

Saved my day ! thanks @mslot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-setup Issues related to installing .NET Core duplicate Indicates duplicate issues
Projects
None yet
Development

No branches or pull requests

10 participants