Skip to content

Instantly share code, notes, and snippets.

@richlander
Created April 22, 2024 21:25
Show Gist options
  • Save richlander/c35678fc5b82c194bdf29ea633b6073b to your computer and use it in GitHub Desktop.
Save richlander/c35678fc5b82c194bdf29ea633b6073b to your computer and use it in GitHub Desktop.
Install .NET 8 SDK on Ubuntu 24.04

Install .NET 8 SDK on Ubuntu 24.04

This is what I do, within Docker.

rich@mazama:~$ docker run --rm -it ubuntu:noble
root@314198dbc17f:/# apt update
Get:1 http://archive.ubuntu.com/ubuntu noble InRelease [255 kB]
Get:2 http://security.ubuntu.com/ubuntu noble-security InRelease [90.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease [89.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease [90.8 kB]
Get:5 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages [331 kB]
Get:6 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages [1813 kB]
Get:7 http://archive.ubuntu.com/ubuntu noble/restricted amd64 Packages [121 kB]
Get:8 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [19.3 MB]
Fetched 22.1 MB in 2s (9482 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
60 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@314198dbc17f:/# apt install -y dotnet-sdk-8.0
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  aspnetcore-runtime-8.0 aspnetcore-targeting-pack-8.0 ca-certificates dotnet-apphost-pack-8.0 dotnet-host-8.0
  dotnet-hostfxr-8.0 dotnet-runtime-8.0 dotnet-targeting-pack-8.0 dotnet-templates-8.0 libicu74
  liblttng-ust-common1t64 liblttng-ust-ctl5t64 liblttng-ust1t64 libnuma1 netstandard-targeting-pack-2.1-8.0 openssl
The following NEW packages will be installed:
  aspnetcore-runtime-8.0 aspnetcore-targeting-pack-8.0 ca-certificates dotnet-apphost-pack-8.0 dotnet-host-8.0
  dotnet-hostfxr-8.0 dotnet-runtime-8.0 dotnet-sdk-8.0 dotnet-targeting-pack-8.0 dotnet-templates-8.0 libicu74
  liblttng-ust-common1t64 liblttng-ust-ctl5t64 liblttng-ust1t64 libnuma1 netstandard-targeting-pack-2.1-8.0 openssl
0 upgraded, 17 newly installed, 0 to remove and 60 not upgraded.
Need to get 148 MB of archives.
After this operation, 534 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble/main amd64 openssl amd64 3.0.13-0ubuntu3 [1002 kB]
Get:2 http://archive.ubuntu.com/ubuntu noble/main amd64 ca-certificates all 20240203 [159 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble/main amd64 libicu74 amd64 74.2-1ubuntu3 [10.9 MB]
Get:4 http://archive.ubuntu.com/ubuntu noble/main amd64 libnuma1 amd64 2.0.18-1build1 [23.3 kB]
Get:5 http://archive.ubuntu.com/ubuntu noble/main amd64 dotnet-host-8.0 amd64 8.0.4-0ubuntu1 [185 kB]
Get:6 http://archive.ubuntu.com/ubuntu noble/main amd64 dotnet-hostfxr-8.0 amd64 8.0.4-0ubuntu1 [144 kB]
Get:7 http://archive.ubuntu.com/ubuntu noble/main amd64 liblttng-ust-common1t64 amd64 2.13.7-1.1ubuntu2 [27.5 kB]
Get:8 http://archive.ubuntu.com/ubuntu noble/main amd64 liblttng-ust-ctl5t64 amd64 2.13.7-1.1ubuntu2 [74.9 kB]
Get:9 http://archive.ubuntu.com/ubuntu noble/main amd64 liblttng-ust1t64 amd64 2.13.7-1.1ubuntu2 [185 kB]
Get:10 http://archive.ubuntu.com/ubuntu noble/main amd64 dotnet-runtime-8.0 amd64 8.0.4-0ubuntu1 [23.9 MB]
Get:11 http://archive.ubuntu.com/ubuntu noble/main amd64 aspnetcore-runtime-8.0 amd64 8.0.4-0ubuntu1 [8311 kB]
Get:12 http://archive.ubuntu.com/ubuntu noble/main amd64 aspnetcore-targeting-pack-8.0 amd64 8.0.4-0ubuntu1 [1912 kB]
Get:13 http://archive.ubuntu.com/ubuntu noble/main amd64 dotnet-apphost-pack-8.0 amd64 8.0.4-0ubuntu1 [3885 kB]
Get:14 http://archive.ubuntu.com/ubuntu noble/main amd64 dotnet-targeting-pack-8.0 amd64 8.0.4-0ubuntu1 [2951 kB]
Get:15 http://archive.ubuntu.com/ubuntu noble/main amd64 dotnet-templates-8.0 amd64 8.0.104-0ubuntu1 [2194 kB]
Get:16 http://archive.ubuntu.com/ubuntu noble/main amd64 netstandard-targeting-pack-2.1-8.0 amd64 8.0.104-0ubuntu1 [1391 kB]
Get:17 http://archive.ubuntu.com/ubuntu noble/main amd64 dotnet-sdk-8.0 amd64 8.0.104-0ubuntu1 [90.7 MB]
Fetched 148 MB in 11s (13.6 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package openssl.
(Reading database ... 4369 files and directories currently installed.)
Preparing to unpack .../00-openssl_3.0.13-0ubuntu3_amd64.deb ...
Unpacking openssl (3.0.13-0ubuntu3) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../01-ca-certificates_20240203_all.deb ...
Unpacking ca-certificates (20240203) ...
Selecting previously unselected package libicu74:amd64.
Preparing to unpack .../02-libicu74_74.2-1ubuntu3_amd64.deb ...
Unpacking libicu74:amd64 (74.2-1ubuntu3) ...
Selecting previously unselected package libnuma1:amd64.
Preparing to unpack .../03-libnuma1_2.0.18-1build1_amd64.deb ...
Unpacking libnuma1:amd64 (2.0.18-1build1) ...
Selecting previously unselected package dotnet-host-8.0.
Preparing to unpack .../04-dotnet-host-8.0_8.0.4-0ubuntu1_amd64.deb ...
Unpacking dotnet-host-8.0 (8.0.4-0ubuntu1) ...
Selecting previously unselected package dotnet-hostfxr-8.0.
Preparing to unpack .../05-dotnet-hostfxr-8.0_8.0.4-0ubuntu1_amd64.deb ...
Unpacking dotnet-hostfxr-8.0 (8.0.4-0ubuntu1) ...
Selecting previously unselected package liblttng-ust-common1t64:amd64.
Preparing to unpack .../06-liblttng-ust-common1t64_2.13.7-1.1ubuntu2_amd64.deb ...
Unpacking liblttng-ust-common1t64:amd64 (2.13.7-1.1ubuntu2) ...
Selecting previously unselected package liblttng-ust-ctl5t64:amd64.
Preparing to unpack .../07-liblttng-ust-ctl5t64_2.13.7-1.1ubuntu2_amd64.deb ...
Unpacking liblttng-ust-ctl5t64:amd64 (2.13.7-1.1ubuntu2) ...
Selecting previously unselected package liblttng-ust1t64:amd64.
Preparing to unpack .../08-liblttng-ust1t64_2.13.7-1.1ubuntu2_amd64.deb ...
Unpacking liblttng-ust1t64:amd64 (2.13.7-1.1ubuntu2) ...
Selecting previously unselected package dotnet-runtime-8.0.
Preparing to unpack .../09-dotnet-runtime-8.0_8.0.4-0ubuntu1_amd64.deb ...
Unpacking dotnet-runtime-8.0 (8.0.4-0ubuntu1) ...
Selecting previously unselected package aspnetcore-runtime-8.0.
Preparing to unpack .../10-aspnetcore-runtime-8.0_8.0.4-0ubuntu1_amd64.deb ...
Unpacking aspnetcore-runtime-8.0 (8.0.4-0ubuntu1) ...
Selecting previously unselected package aspnetcore-targeting-pack-8.0.
Preparing to unpack .../11-aspnetcore-targeting-pack-8.0_8.0.4-0ubuntu1_amd64.deb ...
Unpacking aspnetcore-targeting-pack-8.0 (8.0.4-0ubuntu1) ...
Selecting previously unselected package dotnet-apphost-pack-8.0.
Preparing to unpack .../12-dotnet-apphost-pack-8.0_8.0.4-0ubuntu1_amd64.deb ...
Unpacking dotnet-apphost-pack-8.0 (8.0.4-0ubuntu1) ...
Selecting previously unselected package dotnet-targeting-pack-8.0.
Preparing to unpack .../13-dotnet-targeting-pack-8.0_8.0.4-0ubuntu1_amd64.deb ...
Unpacking dotnet-targeting-pack-8.0 (8.0.4-0ubuntu1) ...
Selecting previously unselected package dotnet-templates-8.0.
Preparing to unpack .../14-dotnet-templates-8.0_8.0.104-0ubuntu1_amd64.deb ...
Unpacking dotnet-templates-8.0 (8.0.104-0ubuntu1) ...
Selecting previously unselected package netstandard-targeting-pack-2.1-8.0.
Preparing to unpack .../15-netstandard-targeting-pack-2.1-8.0_8.0.104-0ubuntu1_amd64.deb ...
Unpacking netstandard-targeting-pack-2.1-8.0 (8.0.104-0ubuntu1) ...
Selecting previously unselected package dotnet-sdk-8.0.
Preparing to unpack .../16-dotnet-sdk-8.0_8.0.104-0ubuntu1_amd64.deb ...
Unpacking dotnet-sdk-8.0 (8.0.104-0ubuntu1) ...
Setting up dotnet-targeting-pack-8.0 (8.0.4-0ubuntu1) ...
Setting up netstandard-targeting-pack-2.1-8.0 (8.0.104-0ubuntu1) ...
Setting up liblttng-ust-common1t64:amd64 (2.13.7-1.1ubuntu2) ...
Setting up aspnetcore-targeting-pack-8.0 (8.0.4-0ubuntu1) ...
Setting up dotnet-apphost-pack-8.0 (8.0.4-0ubuntu1) ...
Setting up libicu74:amd64 (74.2-1ubuntu3) ...
Setting up libnuma1:amd64 (2.0.18-1build1) ...
Setting up liblttng-ust-ctl5t64:amd64 (2.13.7-1.1ubuntu2) ...
Setting up openssl (3.0.13-0ubuntu3) ...
Setting up dotnet-host-8.0 (8.0.4-0ubuntu1) ...
Setting up dotnet-hostfxr-8.0 (8.0.4-0ubuntu1) ...
Setting up dotnet-templates-8.0 (8.0.104-0ubuntu1) ...
Setting up ca-certificates (20240203) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/D
ebconf/FrontEnd/Dialog.pm line 79.)
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 entries checke
d: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.38.2 /usr/local/share/perl/5.38.2 /usr/lib/x86_64-linux-gnu/perl5/5.
38 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.38 /usr/share/perl/5.38 /usr/lo
cal/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 8.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
146 added, 0 removed; done.
Setting up liblttng-ust1t64:amd64 (2.13.7-1.1ubuntu2) ...
Setting up dotnet-runtime-8.0 (8.0.4-0ubuntu1) ...
Setting up aspnetcore-runtime-8.0 (8.0.4-0ubuntu1) ...
Setting up dotnet-sdk-8.0 (8.0.104-0ubuntu1) ...
Processing triggers for libc-bin (2.39-0ubuntu8) ...
Processing triggers for ca-certificates (20240203) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
root@314198dbc17f:/# dotnet --info
.NET SDK:
 Version:           8.0.104
 Commit:            034f91fcc0
 Workload version:  8.0.100-manifests.cd97f1c9

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  24.04
 OS Platform: Linux
 RID:         ubuntu.24.04-x64
 Base Path:   /usr/lib/dotnet/sdk/8.0.104/

.NET workloads installed:
 Workload version: 8.0.100-manifests.cd97f1c9
There are no installed workloads to display.

Host:
  Version:      8.0.4
  Architecture: x64
  Commit:       2d7eea2529

.NET SDKs installed:
  8.0.104 [/usr/lib/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.4 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.4 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
root@314198dbc17f:/#
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment