Repository navigation
Install for Ubuntu 20.04 #17869
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
Merged
Merged
Install for Ubuntu 20.04 #17869
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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)] | ||
|
|
||
| ## Add Microsoft repository key and feed | ||
|
|
||
| Before installing .NET, you'll need to: | ||
|
|
||
| - 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. | ||
|
|
||
| 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)] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you have some examples of what "{the .NET Core package}" text would actually by? (Here and in the bash example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have another update coming, I'll do something with this wording then.