question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot install dotnet-sdk-6.0 on Ubuntu 20.04 and 22.04

See original GitHub issue
podman pull ubuntu:20.04 && podman build --no-cache -t dotnet-ubuntu-test - <<EOF
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y wget apt-transport-https
RUN wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb
RUN apt-get update
RUN apt-get install -y dotnet-sdk-6.0
EOF

Resolved "ubuntu" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/ubuntu:20.04...
Getting image source signatures
Copying blob d7bfe07ed847 [--------------------------------------] 0.0b / 0.0b
Copying config 20fffa419e done  
Writing manifest to image destination
Storing signatures
20fffa419e3aaca519dad480b21e86d9bcfbc7795abf9419adc5adce1198c95e
STEP 1: FROM ubuntu:20.04
STEP 2: RUN apt-get update && apt-get install -y wget apt-transport-https
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:3 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [880 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [1286 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [27.5 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1931 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
Get:11 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2364 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [1365 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1167 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [30.2 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [53.8 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [27.1 kB]
Fetched 22.6 MB in 3s (7413 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  ca-certificates libpsl5 libssl1.1 openssl publicsuffix
The following NEW packages will be installed:
  apt-transport-https ca-certificates libpsl5 libssl1.1 openssl publicsuffix
  wget
0 upgraded, 7 newly installed, 0 to remove and 5 not upgraded.
Need to get 2597 kB of archives.
After this operation, 7379 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libssl1.1 amd64 1.1.1f-1ubuntu2.13 [1321 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 openssl amd64 1.1.1f-1ubuntu2.13 [620 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 ca-certificates all 20211016~20.04.1 [144 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libpsl5 amd64 0.21.0-1ubuntu1 [51.5 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 publicsuffix all 20200303.0012-1 [111 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 wget amd64 1.20.3-1ubuntu2 [348 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 apt-transport-https all 2.0.8 [1704 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 2597 kB in 1s (3694 kB/s)
Selecting previously unselected package libssl1.1:amd64.
(Reading database ... 4126 files and directories currently installed.)
Preparing to unpack .../0-libssl1.1_1.1.1f-1ubuntu2.13_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.1f-1ubuntu2.13) ...
Selecting previously unselected package openssl.
Preparing to unpack .../1-openssl_1.1.1f-1ubuntu2.13_amd64.deb ...
Unpacking openssl (1.1.1f-1ubuntu2.13) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../2-ca-certificates_20211016~20.04.1_all.deb ...
Unpacking ca-certificates (20211016~20.04.1) ...
Selecting previously unselected package libpsl5:amd64.
Preparing to unpack .../3-libpsl5_0.21.0-1ubuntu1_amd64.deb ...
Unpacking libpsl5:amd64 (0.21.0-1ubuntu1) ...
Selecting previously unselected package publicsuffix.
Preparing to unpack .../4-publicsuffix_20200303.0012-1_all.deb ...
Unpacking publicsuffix (20200303.0012-1) ...
Selecting previously unselected package wget.
Preparing to unpack .../5-wget_1.20.3-1ubuntu2_amd64.deb ...
Unpacking wget (1.20.3-1ubuntu2) ...
Selecting previously unselected package apt-transport-https.
Preparing to unpack .../6-apt-transport-https_2.0.8_all.deb ...
Unpacking apt-transport-https (2.0.8) ...
Setting up libpsl5:amd64 (0.21.0-1ubuntu1) ...
Setting up apt-transport-https (2.0.8) ...
Setting up libssl1.1:amd64 (1.1.1f-1ubuntu2.13) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up openssl (1.1.1f-1ubuntu2.13) ...
Setting up publicsuffix (20200303.0012-1) ...
Setting up wget (1.20.3-1ubuntu2) ...
Setting up ca-certificates (20211016~20.04.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
127 added, 0 removed; done.
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Processing triggers for ca-certificates (20211016~20.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
--> 210298fb057
STEP 3: RUN wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
--2022-06-14 21:07:28--  https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
Resolving packages.microsoft.com (packages.microsoft.com)... 104.42.185.173
Connecting to packages.microsoft.com (packages.microsoft.com)|104.42.185.173|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3690 (3.6K) [application/octet-stream]
Saving to: 'packages-microsoft-prod.deb'

     0K ...                                                   100%  450M=0s

2022-06-14 21:07:29 (450 MB/s) - 'packages-microsoft-prod.deb' saved [3690/3690]

--> 8d7b7d1b8e3
STEP 4: RUN dpkg -i packages-microsoft-prod.deb
Selecting previously unselected package packages-microsoft-prod.
(Reading database ... 4472 files and directories currently installed.)
Preparing to unpack packages-microsoft-prod.deb ...
Unpacking packages-microsoft-prod (1.0-ubuntu20.04.1) ...
Setting up packages-microsoft-prod (1.0-ubuntu20.04.1) ...
--> 9b531e5b9d0
STEP 5: RUN rm packages-microsoft-prod.deb
--> 5125457e4f6
STEP 6: RUN apt-get update
Get:1 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease [10.5 kB]
Get:2 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 Packages [182 kB]
Get:3 https://packages.microsoft.com/ubuntu/20.04/prod focal/main arm64 Packages [28.7 kB]
Get:4 https://packages.microsoft.com/ubuntu/20.04/prod focal/main armhf Packages [23.1 kB]
Hit:5 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Fetched 244 kB in 1s (232 kB/s)
Reading package lists...
--> bfa232db1f4
STEP 7: RUN apt-get install -y dotnet-sdk-6.0
Reading package lists...
Building dependency tree...
Reading state information...
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-6.0 : Depends: aspnetcore-runtime-6.0 (>= 6.0.6) but it is not going to be installed
                  Depends: aspnetcore-targeting-pack-6.0 (>= 6.0.6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Error: error building at STEP "RUN apt-get install -y dotnet-sdk-6.0": error while running runtime: exit status 100

when can we have MSFT not break .Net SDKs on such a regular basis?

_Originally posted by @harshavardhana in https://github.com/dotnet/docs/issues/29349#issuecomment-1155714476_

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
baronfelcommented, Jun 15, 2022

I can’t speak to your particular setup, but it’s fairly common to split the ‘install prerequisites’ step from the ‘start up an instance’ step of your deployment solution. For example, in container-based scenarios you’d have a container image base layer that was responsible for getting .NET 6 installed, then the application is a separate layer. In this way you separate the concerns. Something analogous to that may be available for your hosting solution.

Another option may be to pin the version of the packages that you are using - if you specify exact version numbers to your runtime packages, the act of pushing new packages won’t impact your solution.

0reactions
harshavardhanacommented, Jun 15, 2022

I can’t speak to your particular setup, but it’s fairly common to split the ‘install prerequisites’ step from the ‘start up an instance’ step of your deployment solution. For example, in container-based scenarios you’d have a container image base layer that was responsible for getting .NET 6 installed, then the application is a separate layer. In this way you separate the concerns. Something analogous to that may be available for your hosting solution.

Another option may be to pin the version of the packages that you are using - if you specify exact version numbers to your runtime packages, the act of pushing new packages won’t impact your solution.

My expectation is very simple here there is an official way to install things that broke, next I tried to pin the versions that said those versions are no longer available?

The solution to this is please don’t break the DEB pushes, don’t push partial changes - all changes including deps must be pushed together.

FWIW this issue has been resolved already as the necessary packages made its way to relevant mirrors.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing .NET 6 on Ubuntu 22.04 (Jammy) · Issue #7699
The dotnet team recently added support for installing natively from Jammy feeds on Ubuntu 22.04: dotnet/core#7699 This unfortunately created ...
Read more >
Install the .NET SDK or the .NET Runtime on Ubuntu
This article describes how to install .NET on Ubuntu. The Microsoft package repository contains every version of .NET that is currently, or was ......
Read more >
Installing dotnet-sdk-7.0 on Ubuntu 20.04 (and 22.04) ...
0 project I get: CSC : warning CS8034: Unable to load Analyzer assembly /usr/share/dotnet/sdk/7.0.200/Sdks/Microsoft.NET ...
Read more >
Ubuntu: Installing .NET SDK 6 on Ubuntu 20.04 - Fabian Lee
In this article, I will show you how to install the .NET SDK on Ubuntu 20.04 and then create/compile/run a simple web application....
Read more >
installing dotnet6 on ubuntu 22.04 WSL2 - installed but not ...
I discovered that previously I had installed dotnet 3.1 and dotnet 5 using the script method on WSL 20.04 - here, then upgraded...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found