Skip to content

Commit

Permalink
Redesign of install docs for Ubuntu (dotnet#39474)
Browse files Browse the repository at this point in the history
* Start of tests for ubuntu redesign

* add dotnet pivots

* adjust pivots

* adjustments

* updates

* Acro; Little cleaning

* copy all ubuntu info into new article

* Fix link

* tweaks

* add missing repo instructions

* adjust title

* linux flag

* remove 22.10; ubuntu-other; redirects;

* Remove individual ubuntu articles

* Add 'other' ubuntu section

* fix pivot

* Update alpine

* Update install script for deb/ubuntu

* Lint

* Fix ubuntu 22.04

* Unsure why that file was there...

* reword include

* fix script; add archived versions; archive 23.04

* Found and removed 2304 from list of all pivots

* fix script
  • Loading branch information
adegeo authored Apr 1, 2024
1 parent 77e81a5 commit 315ebdd
Show file tree
Hide file tree
Showing 25 changed files with 727 additions and 610 deletions.
28 changes: 28 additions & 0 deletions .openpublishing.redirection.core.json
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,34 @@
"source_path_from_root": "/docs/core/install/linux-package-managers.md",
"redirect_url": "/dotnet/core/install/linux"
},
{
"source_path_from_root": "/docs/core/install/linux-ubuntu-1604.md",
"redirect_url": "/dotnet/core/install/linux-ubuntu-install?pivots=os-linux-ubuntu-1604"
},
{
"source_path_from_root": "/docs/core/install/linux-ubuntu-1804.md",
"redirect_url": "/dotnet/core/install/linux-ubuntu-install?pivots=os-linux-ubuntu-1804"
},
{
"source_path_from_root": "/docs/core/install/linux-ubuntu-2004.md",
"redirect_url": "/dotnet/core/install/linux-ubuntu-install?pivots=os-linux-ubuntu-2004"
},
{
"source_path_from_root": "/docs/core/install/linux-ubuntu-2204.md",
"redirect_url": "/dotnet/core/install/linux-ubuntu-install?pivots=os-linux-ubuntu-2204"
},
{
"source_path_from_root": "/docs/core/install/linux-ubuntu-2210.md",
"redirect_url": "/dotnet/core/install/linux-ubuntu-install?pivots=os-linux-ubuntu-other"
},
{
"source_path_from_root": "/docs/core/install/linux-ubuntu-2304.md",
"redirect_url": "/dotnet/core/install/linux-ubuntu-install?pivots=os-linux-ubuntu-2304"
},
{
"source_path_from_root": "/docs/core/install/linux-ubuntu-2310.md",
"redirect_url": "/dotnet/core/install/linux-ubuntu-install?pivots=os-linux-ubuntu-2310"
},
{
"source_path_from_root": "/docs/core/install/runtime.md",
"redirect_url": "/dotnet/core/install/windows"
Expand Down
10 changes: 2 additions & 8 deletions docs/core/install/includes/linux-install-60-apt.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ms.date: 10/26/2021
ms.topic: include
---

### Install .NET 6 SDK
### Install the SDK

The .NET SDK allows you to develop apps with .NET. If you install the .NET SDK, you don't need to install the corresponding runtime. To install the .NET SDK, run the following commands:

Expand All @@ -14,10 +14,7 @@ sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-6.0
```

> [!IMPORTANT]
> If you receive an error message similar to **Unable to locate package dotnet-sdk-6.0**, see the [troubleshooting](#troubleshooting) section.
### Install .NET 6 Runtime
### Install the Runtime

The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET. In your terminal, run the following commands:

Expand All @@ -26,9 +23,6 @@ sudo apt-get update && \
sudo apt-get install -y aspnetcore-runtime-6.0
```

> [!IMPORTANT]
> If you receive an error message similar to **Unable to locate package aspnetcore-runtime-6.0**, see the [troubleshooting](#troubleshooting) section.
As an alternative to the ASP.NET Core Runtime, you can install the .NET Runtime, which doesn't include ASP.NET Core support: replace `aspnetcore-runtime-6.0` in the previous command with `dotnet-runtime-6.0`:

```bash
Expand Down
6 changes: 0 additions & 6 deletions docs/core/install/includes/linux-install-70-apt.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-7.0
```

> [!IMPORTANT]
> If you receive an error message similar to **Unable to locate package dotnet-sdk-7.0**, see the [troubleshooting](#troubleshooting) section.
### Install the runtime

The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following commands install the ASP.NET Core Runtime, which is the most compatible runtime for .NET. In your terminal, run the following commands:
Expand All @@ -26,9 +23,6 @@ sudo apt-get update && \
sudo apt-get install -y aspnetcore-runtime-7.0
```

> [!IMPORTANT]
> If you receive an error message similar to **Unable to locate package aspnetcore-runtime-7.0**, see the [troubleshooting](#troubleshooting) section.
As an alternative to the ASP.NET Core Runtime, you can install the .NET Runtime, which doesn't include ASP.NET Core support: replace `aspnetcore-runtime-7.0` in the previous command with `dotnet-runtime-7.0`:

```bash
Expand Down
6 changes: 0 additions & 6 deletions docs/core/install/includes/linux-install-80-apt.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-8.0
```

> [!IMPORTANT]
> If you receive an error message similar to **Unable to locate package dotnet-sdk-8.0**, see the [troubleshooting](#troubleshooting) section.
### Install the runtime

The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following commands install the ASP.NET Core Runtime, which is the most compatible runtime for .NET. In your terminal, run the following commands:
Expand All @@ -26,9 +23,6 @@ sudo apt-get update && \
sudo apt-get install -y aspnetcore-runtime-8.0
```

> [!IMPORTANT]
> If you receive an error message similar to **Unable to locate package aspnetcore-runtime-8.0**, see the [troubleshooting](#troubleshooting) section.
As an alternative to the ASP.NET Core Runtime, you can install the .NET Runtime, which doesn't include ASP.NET Core support: replace `aspnetcore-runtime-8.0` in the previous command with `dotnet-runtime-8.0`:

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ms.custom: linux-related-content
---

> [!IMPORTANT]
> Using a package manager to install .NET from the **Microsoft package feed** only supports the **x64** architecture. Other architectures, such as **Arm**, aren't supported by the **Microsoft package feed**. Use the Ubuntu feed or manually install .NET. Be cautious of package mix up problems. For more information, see [.NET package mix ups on Linux](../linux-package-mixup.md?pivots=os-linux-ubuntu#whats-going-on).
> Using a package manager to install .NET from the **Microsoft package feed** only supports the **x64** architecture. Other architectures, such as **Arm**, aren't supported by the **Microsoft package feed**. Use the Ubuntu feed or manually install .NET. Be cautious of package mix up problems when using multiple feeds. For more information, see [.NET package mix ups on Linux](../linux-package-mixup.md?pivots=os-linux-ubuntu#whats-going-on).
For more information on installing .NET **without a package manager**, see one of the following articles:

Expand Down
8 changes: 8 additions & 0 deletions docs/core/install/includes/linux-ubuntu-80-ms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
author: adegeo
ms.author: adegeo
ms.date: 03/19/2024
ms.topic: include
---

.NET 8.0 isn't available in the Ubuntu package repository. [Register the Microsoft package repository](../linux-ubuntu.md#register-the-microsoft-package-repository) and use that feed to install .NET through APT. If you use the Microsoft package repository to install .NET, you should deprioritize .NET packages from the Ubuntu repository. For more information, see [I need a version of .NET that isn't provided by my Linux distribution](../linux-package-mixup.md?pivots=os-linux-ubuntu#i-need-a-version-of-net-that-isnt-provided-by-my-linux-distribution).
8 changes: 8 additions & 0 deletions docs/core/install/includes/linux-ubuntu-package-feed-both.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
author: adegeo
ms.author: adegeo
ms.date: 03/18/2024
ms.topic: include
---

.NET is available in the Ubuntu package manager feeds, as well as the Microsoft package repository. However, you should only use one or the other to install .NET. If you want to use the Microsoft package repository, see [How to register the Microsoft package repository](../linux-ubuntu.md#register-the-microsoft-package-repository).
8 changes: 8 additions & 0 deletions docs/core/install/includes/linux-ubuntu-package-feed-ms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
author: adegeo
ms.author: adegeo
ms.date: 03/18/2024
ms.topic: include
---

The default Ubuntu package repository doesn't contain this version of .NET. Use the [Microsoft package repository instead](../linux-ubuntu.md#register-the-microsoft-package-repository).
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
author: adegeo
ms.author: adegeo
ms.date: 03/29/2024
ms.topic: include
ms.custom: linux-related-content
---

```bash
# Define the OS version, name, and codename
source /etc/os-release

# Download the Microsoft keys
sudo apt-get install -y gpg wget
wget https://packages.microsoft.com/keys/microsoft.asc
cat microsoft.asc | gpg --dearmor -o microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/

# Add the Microsoft repository to the system's sources list
wget https://packages.microsoft.com/config/$ID/$VERSION_ID/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list

# Set ownership
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list

# Update packages and install .NET
sudo apt-get update && \
sudo apt-get install -y {dotnet-package}
```
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
author: adegeo
ms.author: adegeo
ms.date: 11/14/2023
ms.date: 03/29/2024
ms.topic: include
ms.custom: linux-related-content
---

If you receive an error message similar to **Unable to locate package {dotnet-package}** or **Some packages could not be installed**, run the following commands.
Expand All @@ -12,9 +13,6 @@ There are two placeholders in the following set of commands.
- `{dotnet-package}`\
This represents the .NET package you're installing, such as `aspnetcore-runtime-8.0`. This is used in the following `sudo apt-get install` command.

- `{os-version}`\
This represents the distribution version you're on. This is used in the `wget` command below. The distribution version is the numerical value, such as `20.04` on Ubuntu or `10` on Debian.

First, try purging the package list:

```bash
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
author: adegeo
ms.author: adegeo
ms.date: 03/29/2024
ms.topic: include
ms.custom: linux-related-content
---

```bash
# Define the OS version, name, and codename
source /etc/os-release

# Download the Microsoft keys
sudo apt-get install -y gpg wget
wget https://packages.microsoft.com/keys/microsoft.asc
cat microsoft.asc | gpg --dearmor -o microsoft.asc.gpg

# Add the Microsoft repository to the system's sources list
wget https://packages.microsoft.com/config/$ID/$VERSION_ID/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list

# Move the key to the appropriate place
sudo mv microsoft.asc.gpg $(cat /etc/apt/sources.list.d/microsoft-prod.list | grep -oP "(?<=signed-by=).*(?=\])")

# Update packages and install .NET
sudo apt-get update && \
sudo apt-get install -y {dotnet-package}
```
29 changes: 16 additions & 13 deletions docs/core/install/includes/package-manager-heading-hack-pkgname.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
---
author: adegeo
ms.author: adegeo
ms.date: 11/14/2023
ms.date: 03/18/2024
ms.topic: include
---

All versions of .NET are available for download at <https://dotnet.microsoft.com/download/dotnet>, but require [manual installation](../linux-scripted-manual.md). You can try and use the package manager to install a different version of .NET. However, the requested version may not be available.
All versions of .NET are available for download at <https://dotnet.microsoft.com/download/dotnet>, but require [manual installation](../linux-scripted-manual.md). You can try to use the package manager to install a different version of .NET. However, the requested version might not be available.

The packages added to package manager feeds are named in a hackable format, for example: `{product}-{type}-{version}`.

- **product**\
The type of .NET product to install. Valid options are:

- dotnet
- aspnetcore
- `dotnet`
- `aspnetcore`

- **type**\
Chooses the SDK or the runtime. Valid options are:

- sdk (only available for the **dotnet** product)
- runtime
- `sdk` (only available for the **dotnet** product)
- `runtime`

- **version**\
The version of the SDK or runtime to install. This article will always give the instructions for the latest supported version. Valid options are any released version, such as:
The version of the SDK or runtime to install. Valid options are any released version, such as:

- 8.0
- 6.0
- 3.1
- 2.1
- `8.0`
- `6.0`
- `3.1`
- `2.1`

It's possible the SDK/runtime you're trying to download is not available for your Linux distribution. For a list of supported distributions, see [Install .NET on Linux](../linux.md).
It's possible the SDK/runtime you're trying to download isn't available for your Linux distribution. For a list of supported distributions, see [Install .NET on Linux](../linux.md).

### Examples

Expand All @@ -38,6 +38,9 @@ The version of the SDK or runtime to install. This article will always give the
- Install the .NET 5 SDK: `dotnet-sdk-5.0`
- Install the .NET Core 3.1 SDK: `dotnet-sdk-3.1`

> [!NOTE]
> Some package might not be available on your Linux distribution.
### Package missing

If the package-version combination doesn't work, it's not available. For example, there isn't an ASP.NET Core SDK, the SDK components are included with the .NET SDK. The value `aspnetcore-sdk-8.0` is incorrect and should be `dotnet-sdk-8.0`. For a list of Linux distributions supported by .NET, see [.NET dependencies and requirements](../linux.md).
If the package-version combination doesn't work, it's not available. For example, there isn't an ASP.NET Core SDK. The SDK components for ASP.NET Core are included with the .NET SDK. The value `aspnetcore-sdk-8.0` is incorrect and should be `dotnet-sdk-8.0`. For a list of Linux distributions supported by .NET, see [.NET dependencies and requirements](../linux.md).
29 changes: 18 additions & 11 deletions docs/core/install/linux-alpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Install .NET on Alpine
description: Demonstrates the various ways to install .NET SDK and .NET Runtime on Alpine.
author: adegeo
ms.author: adegeo
ms.date: 01/09/2024
ms.date: 03/26/2024
ms.custom: linux-related-content
---

Expand All @@ -24,7 +24,7 @@ The Alpine package manager supports installing some versions of .NET. If the .NE

## Install .NET 8

.NET 8 isn't yet available in the official Alpine package repository. Use one of the following ways to install .NET 8:
.NET 8 isn't yet available in the default branch of the Alpine package repository. Use the `edge` branch to install .NET 8. Alternatively, use one of the following ways to install .NET 8:

- [Use the .NET install script.](linux-scripted-manual.md#scripted-install)
- [Download and install .NET manually.](linux-scripted-manual.md#manual-install)
Expand All @@ -43,6 +43,7 @@ The following table is a list of currently supported .NET releases and the versi

| Alpine | Supported Version | Available in Package Manager |
|--------|--------------------| -----------------------------|
| 3.19 | .NET 8.0, .NET 7.0, .NET 6.0 | .NET 7.0, .NET 6.0 |
| 3.18 | .NET 8.0, .NET 7.0, .NET 6.0 | .NET 7.0, .NET 6.0 |
| 3.17 | .NET 8.0, .NET 7.0, .NET 6.0 | .NET 7.0, .NET 6.0 |
| 3.16 | .NET 7.0, .NET 6.0 | .NET 6.0 |
Expand Down Expand Up @@ -77,25 +78,31 @@ The following table is a list of currently supported .NET releases and the archi

When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you'll need to make sure these libraries are installed:

### 3.18+

- ca-certificates-bundle
- libgcc
- libssl3
- libstdc++
- zlib
- libgdiplus (if the .NET app requires the *System.Drawing.Common* assembly)

### 3.15 - 3.17

- icu-libs
- krb5-libs
- libgcc
- libgdiplus (if the .NET app requires the *System.Drawing.Common* assembly)
- libintl
- libssl1.1 (for 3.14.x and older)
- libssl3 (for 3.15.x and newer)
- libssl3
- libstdc++
- zlib
- libgdiplus (if the .NET app requires the *System.Drawing.Common* assembly)

To install the needed requirements, run the following command:

```bash
apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib
```
Use the `apk add` command to install the dependencies.

[!INCLUDE [linux-libgdiplus-general](includes/linux-libgdiplus-general.md)]

To install libgdiplus on Alpine 3.16 or later, run:
To install `libgdiplus`, run:

```bash
apk add libgdiplus
Expand Down
20 changes: 8 additions & 12 deletions docs/core/install/linux-debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,15 @@ This section provides information on common errors you may get while using APT t

### Unable to locate \\ Some packages could not be installed

[!INCLUDE [package-manager-failed-to-find-deb](includes/package-manager-failed-to-find-deb.md)]
[!INCLUDE [package-manager-failed-to-find-deb-intro](includes/package-manager-failed-to-find-deb-intro.md)]

```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/debian/{os-version}/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 update && \
sudo apt-get install -y {dotnet-package}
```
If you're using Debian 12 or later, try the following commands:

[!INCLUDE [package-manager-failed-to-find-deb-new](includes/package-manager-failed-to-find-deb-new.md)]

If you're using a Debian version prior to 12, try the following commands:

[!INCLUDE [package-manager-failed-to-find-deb-classic](includes/package-manager-failed-to-find-deb-classic.md)]

### Failed to fetch

Expand Down
Loading

0 comments on commit 315ebdd

Please sign in to comment.