From 416571eea7615c72e932ec381159268f6d097590 Mon Sep 17 00:00:00 2001 From: Andy De George Date: Wed, 15 Apr 2020 13:02:12 -0700 Subject: [PATCH 1/3] Add article for 20.04 when ready --- .../includes/package-manager-switcher.md | 1 + .../linux-package-manager-ubuntu-2004.md | 111 ++++++++++++++++++ docs/core/toc.yml | 2 + 3 files changed, 114 insertions(+) create mode 100644 docs/core/install/linux-package-manager-ubuntu-2004.md diff --git a/docs/core/install/includes/package-manager-switcher.md b/docs/core/install/includes/package-manager-switcher.md index 8f492d1d008f0..4e4a756f3fb39 100644 --- a/docs/core/install/includes/package-manager-switcher.md +++ b/docs/core/install/includes/package-manager-switcher.md @@ -1,6 +1,7 @@ > [!div class="op_single_selector"] > +> - [Ubuntu 20.04 - x64](../linux-package-manager-ubuntu-2004.md) > - [Ubuntu 19.10 - x64](../linux-package-manager-ubuntu-1910.md) > - [Ubuntu 19.04 - x64](../linux-package-manager-ubuntu-1904.md) > - [Ubuntu 18.04 - x64](../linux-package-manager-ubuntu-1804.md) diff --git a/docs/core/install/linux-package-manager-ubuntu-2004.md b/docs/core/install/linux-package-manager-ubuntu-2004.md new file mode 100644 index 0000000000000..974b2131c3764 --- /dev/null +++ b/docs/core/install/linux-package-manager-ubuntu-2004.md @@ -0,0 +1,111 @@ +--- +title: Install .NET Core on Ubuntu 20.04 package manager - .NET Core +description: Use a package manager to install .NET Core SDK and runtime on Ubuntu 20.04. +author: thraka +ms.author: adegeo +ms.date: 04/15/2020 +--- + +# Ubuntu 20.04 Package Manager - Install .NET Core + +[!INCLUDE [package-manager-switcher](./includes/package-manager-switcher.md)] + +This article describes how to use a package manager to install .NET Core on Ubuntu 20.04. + +[!INCLUDE [package-manager-intro-sdk-vs-runtime](includes/package-manager-intro-sdk-vs-runtime.md)] + +## Register Microsoft key and feed + +Before installing .NET, you'll need to: + +- Register the Microsoft key. +- Register the product repository. +- Install required dependencies. + +This only needs to be done once per machine. + +Open a terminal and run the following commands. + +```bash +wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +sudo dpkg -i packages-microsoft-prod.deb +``` + +## Install the .NET Core SDK + +Update the products available for installation, then install the .NET Core SDK. In your terminal, run the following commands. + +```bash +sudo apt-get update +sudo apt-get install apt-transport-https +sudo apt-get update +sudo apt-get install dotnet-sdk-3.1 +``` + +> [!IMPORTANT] +> 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. + +## Install the ASP.NET Core runtime + +Update the products available for installation, then install the ASP.NET Core runtime. In your terminal, run the following commands. + +```bash +sudo apt-get update +sudo apt-get install apt-transport-https +sudo apt-get update +sudo apt-get install aspnetcore-runtime-3.1 +``` + +> [!IMPORTANT] +> 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. + +## Install the .NET Core runtime + +Update the products available for installation, then install the .NET Core runtime. In your terminal, run the following commands. + +```bash +sudo apt-get update +sudo apt-get install apt-transport-https +sudo apt-get update +sudo apt-get install dotnet-runtime-3.1 +``` + +> [!IMPORTANT] +> 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. + +## How to install other versions + +[!INCLUDE [package-manager-switcher](./includes/package-manager-heading-hack-pkgname.md)] + +## Troubleshoot the package manager + +This section provides information on common errors you may get while using the package manager to install .NET Core. + +### Unable to locate + +If you receive an error message similar to **Unable to locate package {the .NET Core package}**, run the following commands. + +```bash +sudo dpkg --purge packages-microsoft-prod && sudo dpkg -i packages-microsoft-prod.deb +sudo apt-get update +sudo apt-get install {the .NET Core package} +``` + +If that doesn't work, you can run a manual install with the following commands. + +```bash +sudo apt-get install -y gpg +wget O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg +sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ +wget https://packages.microsoft.com/config/ubuntu/20.04/prod.list +sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list +sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg +sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list +sudo apt-get install -y apt-transport-https +sudo apt-get update +sudo apt-get install {the .NET Core package} +``` + +### Failed to fetch + +[!INCLUDE [package-manager-failed-to-fetch-deb](includes/package-manager-failed-to-fetch-deb.md)] diff --git a/docs/core/toc.yml b/docs/core/toc.yml index 2aafa650e1732..e12dbb1f0ece0 100644 --- a/docs/core/toc.yml +++ b/docs/core/toc.yml @@ -20,6 +20,8 @@ href: install/how-to-detect-installed-versions.md - name: Linux package managers items: + - name: Ubuntu 20.04 + href: install/linux-package-manager-ubuntu-2004.md - name: Ubuntu 19.10 href: install/linux-package-manager-ubuntu-1910.md - name: Ubuntu 19.04 From a469a760d348ee523066b76fc19e298c715ba936 Mon Sep 17 00:00:00 2001 From: Andy De George Date: Thu, 16 Apr 2020 16:47:53 -0700 Subject: [PATCH 2/3] Change message wording --- docs/core/install/linux-package-manager-ubuntu-2004.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/core/install/linux-package-manager-ubuntu-2004.md b/docs/core/install/linux-package-manager-ubuntu-2004.md index 974b2131c3764..5a31edde24daf 100644 --- a/docs/core/install/linux-package-manager-ubuntu-2004.md +++ b/docs/core/install/linux-package-manager-ubuntu-2004.md @@ -14,12 +14,12 @@ This article describes how to use a package manager to install .NET Core on Ubun [!INCLUDE [package-manager-intro-sdk-vs-runtime](includes/package-manager-intro-sdk-vs-runtime.md)] -## Register Microsoft key and feed +## Add Microsoft repository key and feed Before installing .NET, you'll need to: -- Register the Microsoft key. -- Register the product repository. +- Add the Microsoft package signing key to the list of trusted keys. +- Add the repository to the package manager. - Install required dependencies. This only needs to be done once per machine. From 124cd5c88547d9812a36d4219847087c46301d6b Mon Sep 17 00:00:00 2001 From: Andy De George Date: Thu, 23 Apr 2020 13:51:44 -0700 Subject: [PATCH 3/3] Fix error in wget command --- docs/core/install/linux-package-manager-ubuntu-1910.md | 2 +- docs/core/install/linux-package-manager-ubuntu-2004.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/install/linux-package-manager-ubuntu-1910.md b/docs/core/install/linux-package-manager-ubuntu-1910.md index 01b36cdced4ca..9cfbc7f881055 100644 --- a/docs/core/install/linux-package-manager-ubuntu-1910.md +++ b/docs/core/install/linux-package-manager-ubuntu-1910.md @@ -95,7 +95,7 @@ If that doesn't work, you can run a manual install with the following commands. ```bash sudo apt-get install -y gpg -wget O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg +wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ wget https://packages.microsoft.com/config/ubuntu/19.10/prod.list sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list diff --git a/docs/core/install/linux-package-manager-ubuntu-2004.md b/docs/core/install/linux-package-manager-ubuntu-2004.md index 5a31edde24daf..bdb85b5445f1d 100644 --- a/docs/core/install/linux-package-manager-ubuntu-2004.md +++ b/docs/core/install/linux-package-manager-ubuntu-2004.md @@ -95,7 +95,7 @@ If that doesn't work, you can run a manual install with the following commands. ```bash sudo apt-get install -y gpg -wget O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg +wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ wget https://packages.microsoft.com/config/ubuntu/20.04/prod.list sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list