Skip to content

Commit 7eb84cf

Browse files
authored
Install for Ubuntu 20.04 (#17869)
* Add article for 20.04 when ready * Change message wording * Fix error in wget command
1 parent 3be8931 commit 7eb84cf

File tree

4 files changed

+115
-1
lines changed

4 files changed

+115
-1
lines changed

docs/core/install/includes/package-manager-switcher.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
> [!div class="op_single_selector"]
33
>
4+
> - [Ubuntu 20.04 - x64](../linux-package-manager-ubuntu-2004.md)
45
> - [Ubuntu 19.10 - x64](../linux-package-manager-ubuntu-1910.md)
56
> - [Ubuntu 19.04 - x64](../linux-package-manager-ubuntu-1904.md)
67
> - [Ubuntu 18.04 - x64](../linux-package-manager-ubuntu-1804.md)

docs/core/install/linux-package-manager-ubuntu-1910.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ If that doesn't work, you can run a manual install with the following commands.
9595

9696
```bash
9797
sudo apt-get install -y gpg
98-
wget O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg
98+
wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg
9999
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
100100
wget https://packages.microsoft.com/config/ubuntu/19.10/prod.list
101101
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
title: Install .NET Core on Ubuntu 20.04 package manager - .NET Core
3+
description: Use a package manager to install .NET Core SDK and runtime on Ubuntu 20.04.
4+
author: thraka
5+
ms.author: adegeo
6+
ms.date: 04/15/2020
7+
---
8+
9+
# Ubuntu 20.04 Package Manager - Install .NET Core
10+
11+
[!INCLUDE [package-manager-switcher](./includes/package-manager-switcher.md)]
12+
13+
This article describes how to use a package manager to install .NET Core on Ubuntu 20.04.
14+
15+
[!INCLUDE [package-manager-intro-sdk-vs-runtime](includes/package-manager-intro-sdk-vs-runtime.md)]
16+
17+
## Add Microsoft repository key and feed
18+
19+
Before installing .NET, you'll need to:
20+
21+
- Add the Microsoft package signing key to the list of trusted keys.
22+
- Add the repository to the package manager.
23+
- Install required dependencies.
24+
25+
This only needs to be done once per machine.
26+
27+
Open a terminal and run the following commands.
28+
29+
```bash
30+
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
31+
sudo dpkg -i packages-microsoft-prod.deb
32+
```
33+
34+
## Install the .NET Core SDK
35+
36+
Update the products available for installation, then install the .NET Core SDK. In your terminal, run the following commands.
37+
38+
```bash
39+
sudo apt-get update
40+
sudo apt-get install apt-transport-https
41+
sudo apt-get update
42+
sudo apt-get install dotnet-sdk-3.1
43+
```
44+
45+
> [!IMPORTANT]
46+
> If you receive an error message similar to **Unable to locate package dotnet-sdk-3.1**, see the [Troubleshoot the package manager](#troubleshoot-the-package-manager) section.
47+
48+
## Install the ASP.NET Core runtime
49+
50+
Update the products available for installation, then install the ASP.NET Core runtime. In your terminal, run the following commands.
51+
52+
```bash
53+
sudo apt-get update
54+
sudo apt-get install apt-transport-https
55+
sudo apt-get update
56+
sudo apt-get install aspnetcore-runtime-3.1
57+
```
58+
59+
> [!IMPORTANT]
60+
> If you receive an error message similar to **Unable to locate package aspnetcore-runtime-3.1**, see the [Troubleshoot the package manager](#troubleshoot-the-package-manager) section.
61+
62+
## Install the .NET Core runtime
63+
64+
Update the products available for installation, then install the .NET Core runtime. In your terminal, run the following commands.
65+
66+
```bash
67+
sudo apt-get update
68+
sudo apt-get install apt-transport-https
69+
sudo apt-get update
70+
sudo apt-get install dotnet-runtime-3.1
71+
```
72+
73+
> [!IMPORTANT]
74+
> If you receive an error message similar to **Unable to locate package dotnet-runtime-3.1**, see the [Troubleshoot the package manager](#troubleshoot-the-package-manager) section.
75+
76+
## How to install other versions
77+
78+
[!INCLUDE [package-manager-switcher](./includes/package-manager-heading-hack-pkgname.md)]
79+
80+
## Troubleshoot the package manager
81+
82+
This section provides information on common errors you may get while using the package manager to install .NET Core.
83+
84+
### Unable to locate
85+
86+
If you receive an error message similar to **Unable to locate package {the .NET Core package}**, run the following commands.
87+
88+
```bash
89+
sudo dpkg --purge packages-microsoft-prod && sudo dpkg -i packages-microsoft-prod.deb
90+
sudo apt-get update
91+
sudo apt-get install {the .NET Core package}
92+
```
93+
94+
If that doesn't work, you can run a manual install with the following commands.
95+
96+
```bash
97+
sudo apt-get install -y gpg
98+
wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg
99+
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
100+
wget https://packages.microsoft.com/config/ubuntu/20.04/prod.list
101+
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
102+
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
103+
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
104+
sudo apt-get install -y apt-transport-https
105+
sudo apt-get update
106+
sudo apt-get install {the .NET Core package}
107+
```
108+
109+
### Failed to fetch
110+
111+
[!INCLUDE [package-manager-failed-to-fetch-deb](includes/package-manager-failed-to-fetch-deb.md)]

docs/core/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
href: install/how-to-detect-installed-versions.md
2121
- name: Linux package managers
2222
items:
23+
- name: Ubuntu 20.04
24+
href: install/linux-package-manager-ubuntu-2004.md
2325
- name: Ubuntu 19.10
2426
href: install/linux-package-manager-ubuntu-1910.md
2527
- name: Ubuntu 19.04

0 commit comments

Comments
 (0)