Net core ���������� ��� linux

Install .NET on Linux

.NET is available on different Linux distributions. Most Linux platforms and distributions have a major release each year, and most provide a package manager that is used to install .NET. This article describes what is currently supported and which package manager is used.

The rest of this article is a breakdown of each major Linux distribution that .NET supports. All .NET releases remain supported until either the version of .NET reaches end-of-support or the Linux distribution reaches end-of-life.

For the best compatibility, choose a long-term release (LTS) version.

Unsupported releases

The following versions of .NET are вќЊ no longer supported. The downloads for these still remain published:

These unsupported versions aren’t detailed in the sections below and your mileage may vary if you try to install them.

Manual installation

If you don’t want to use a package manager to install .NET on Linux, you can install .NET in one of the following ways:

Be sure to check the appropriate distribution page for more information about any required dependencies that may be missing when you do a manual installation.

Install preview versions

Preview and Release Candidate versions of .NET aren’t available in package managers. You can install previews and release candidates of .NET manually.

Alpine

The following table is a list of currently supported .NET releases and the versions of Alpine they’re supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Alpine reaches end-of-life.

  • A вњ”пёЏ indicates that the version of Alpine or .NET is still supported.
  • A вќЊ indicates that the version of Alpine or .NET isn’t supported on that Alpine release.
  • When both a version of Alpine and a version of .NET have вњ”пёЏ, that OS and .NET combination is supported.
Alpine .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 3.13 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 3.12 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 3.11 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 3.10 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0
вќЊ 3.9 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0
вќЊ 3.8 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0

CentOS

CentOS 7 uses Yum as a package manager and CentOS 8 uses DNF.

The following table is a list of currently supported .NET releases on both CentOS 7 and CentOS 8. These versions remain supported until either the version of .NET reaches end-of-support or the version of CentOS is no longer supported.

CentOS .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 8 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 7 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0

Debian

Debian uses APT (Advanced Package Tool) as a package manager.

The following table is a list of currently supported .NET releases and the versions of Debian they’re supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Debian reaches end-of-life.

  • A вњ”пёЏ indicates that the version of Debian or .NET is still supported.
  • A вќЊ indicates that the version of Debian or .NET isn’t supported on that Debian release.
  • When both a version of Debian and a version of .NET have вњ”пёЏ, that OS and .NET combination is supported.
Debian .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 11 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 10 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 9 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вќЊ 8 вњ”пёЏ 2.1 вќЊ 3.1 вќЊ 5.0

Fedora

Fedora uses DNF as its package manager.

The following table is a list of currently supported .NET releases and the versions of Fedora they’re supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Fedora reaches end-of-life.

  • A вњ”пёЏ indicates that the version of Fedora or .NET is still supported.
  • A вќЊ indicates that the version of Fedora or .NET isn’t supported on that Fedora release.
  • When both a version of Fedora and a version of .NET have вњ”пёЏ, that OS and .NET combination is supported.
Fedora .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 34 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 33 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 32 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вќЊ 31 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0
вќЊ 30 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0
вќЊ 29 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0
вќЊ 28 вњ”пёЏ 2.1 вќЊ 3.1 вќЊ 5.0
вќЊ 27 вњ”пёЏ 2.1 вќЊ 3.1 вќЊ 5.0

openSUSE

openSUSE uses zypper as the package manager.

The following table is a list of currently supported .NET releases on openSUSE 15. These versions remain supported until either the version of .NET reaches end-of-support or the version of openSUSE is no longer supported.

openSUSE .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 15 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0

Red Hat

Red Hat Enterprise Linux (RHEL) uses yum (RHEL 7) and DNF (RHEL 8) as the package manager.

The following table is a list of currently supported .NET releases on both RHEL 7 and RHEL 8. These versions remain supported until either the version of .NET reaches end-of-support or the version of RHEL is no longer supported.

  • A вњ”пёЏ indicates that the version of RHEL or .NET is still supported.
  • A вќЊ indicates that the version of RHEL or .NET isn’t supported on that RHEL release.
  • When both a version of RHEL and a version of .NET have вњ”пёЏ, that OS and .NET combination is supported.
RHEL .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 8 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 7 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0

For more information, see Install .NET on RHEL.

SLES uses zypper as the package manager.

The following table is a list of currently supported .NET releases on both SLES 12 SP2 and SLES 15. These versions remain supported until either the version of .NET reaches end-of-support or the version of SLES is no longer supported.

  • A вњ”пёЏ indicates that the version of SLES or .NET is still supported.
  • A вќЊ indicates that the version of SLES or .NET isn’t supported on that SLES release.
  • When both a version of SLES and a version of .NET have вњ”пёЏ, that OS and .NET combination is supported.
SLES .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 15 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 12 SP2 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0

For more information, see Install .NET on SLES.

Ubuntu

Ubuntu uses APT (Advanced Package Tool) as a package manager.

The following table represents the support status of Ubuntu and .NET.

Источник

Install the .NET SDK or the .NET Runtime manually

.NET is supported on Linux and this article describes how to install .NET on Linux using the install script or by extracting the binaries. For a list of distributions that support the built-in package manager, see Install .NET on Linux.

You can also install .NET with snap. For more information, see Install the .NET SDK or the .NET Runtime with Snap.

Install the SDK (which includes the runtime) if you want to develop .NET apps. Or, if you only need to run apps, install the Runtime. If you’re installing the Runtime, we suggest you install the ASP.NET Core Runtime as it includes both .NET and ASP.NET Core runtimes.

If you’ve already installed the SDK or Runtime, use the dotnet —list-sdks and dotnet —list-runtimes commands to see which versions are installed. For more information, see How to check that .NET is already installed.

.NET releases

The following table lists the .NET (and .NET Core) releases:

вњ”пёЏ Supported вќЊ Unsupported
5.0 3.0
3.1 (LTS) 2.2
2.1 (LTS) 2.0
1.1
1.0

For more information about the life cycle of .NET releases, see .NET Core and .NET 5 Support Policy.

Dependencies

It’s possible that when you install .NET, specific dependencies may not be installed, such as when manually installing. The following list details Linux distributions that are supported by Microsoft and have dependencies you may need to install. Check the distribution page for more information:

For generic information about the dependencies, see Self-contained Linux apps.

RPM dependencies

If your distribution wasn’t previously listed, and is RPM-based, you may need the following dependencies:

If the target runtime environment’s OpenSSL version is 1.1 or newer, you’ll need to install compat-openssl10.

DEB dependencies

If your distribution wasn’t previously listed, and is debian-based, you may need the following dependencies:

Common dependencies

For .NET apps that use the System.Drawing.Common assembly, you’ll also need the following dependency:

You can install a recent version of libgdiplus by adding the Mono repository to your system. For more information, see https://www.mono-project.com/download/stable/.

Scripted install

The dotnet-install scripts are used for automation and non-admin installs of the SDK and Runtime. You can download the script from https://dot.net/v1/dotnet-install.sh.

![IMPORTANT] Bash is required to run the script.

The script defaults to installing the latest SDK long term support (LTS) version, which is .NET Core 3.1. To install the current release, which may not be an (LTS) version, use the -c Current parameter.

To install .NET Runtime instead of the SDK, use the —runtime parameter.

You can install a specific version by altering the -c parameter to indicate the specific version. The following command installs .NET SDK 5.0.

Manual install

As an alternative to the package managers, you can download and manually install the SDK and runtime. Manual installation is commonly used as part of continuous integration testing or on an unsupported Linux distribution. For a developer or user, it’s better to use a package manager.

First, download a binary release for either the SDK or the runtime from one of the following sites. If you install the .NET SDK, you will not need to install the corresponding runtime:

Next, extract the downloaded file and use the export command to set DOTNET_ROOT to the extracted folder’s location and then ensure .NET is in PATH. This should make the .NET CLI commands available at the terminal.

Alternatively, after downloading the .NET binary, the following commands may be run from the directory where the file is saved to extract the runtime. This will also make the .NET CLI commands available at the terminal and set the required environment variables. Remember to change the DOTNET_FILE value to the name of the downloaded binary:

The preceding export commands only make the .NET CLI commands available for the terminal session in which it was run.

You can edit your shell profile to permanently add the commands. There are a number of different shells available for Linux and each has a different profile. For example:

    Bash Shell:

/.bashrc
Korn Shell:

/.kshrc or .profile
Z Shell:

Edit the appropriate source file for your shell and add :$HOME/dotnet to the end of the existing PATH statement. If no PATH statement is included, add a new line with export PATH=$PATH:$HOME/dotnet .

Also, add export DOTNET_ROOT=$HOME/dotnet to the end of the file.

This approach lets you install different versions into separate locations and choose explicitly which one to use by which application.

Источник

Установка .NET в Linux

Платформа .NET доступна в различных дистрибутивах Linux. Для большинства платформ и дистрибутивов Linux разработчики каждый год публикуют основной выпуск. В большей части таких выпусков есть диспетчер пакетов, который используется для установки .NET. В этой статье приведены сведения о поддержке и об используемом диспетчере пакетов.

В остальной части этой статьи содержится конкретная информация по каждой из основных версий дистрибутивов Linux, которые поддерживает .NET. Все выпуски .NET поддерживаются до того же времени, что и версии .NET или дистрибутива Linux.

Для максимальной совместимости выберите версию LTS.

Неподдерживаемые выпуски

Следующие версии .NET больше не поддерживаются (❌). (но остаются доступными для скачивания):

Такие неподдерживаемые версии не описаны в приведенных ниже разделах. Поэтому, если вы попытаетесь установить их, полученные вами результаты могут отличаться от указанных.

Установка вручную

Если вы не хотите использовать диспетчер пакетов для установки .NET в Linux, можно установить .NET одним из следующих способов:

На странице, посвященной дистрибутиву, обязательно просмотрите дополнительные сведения о необходимых зависимостях, которые могут отсутствовать при установке вручную.

Установка предварительных версий

Предварительные версии и релиз-кандидаты .NET недоступны в диспетчере пакетов. Вы можете установить предварительные версии и релиз-кандидаты .NET вручную.

Alpine

В приведенной ниже таблице содержится список поддерживаемых сейчас выпусков .NET и версий Alpine, в которых они поддерживаются. Эти версии поддерживаются до окончания поддержки версии .NET либо до окончания жизненного цикла версии Alpine.

  • Значок ✔️ означает, что версия Alpine или .NET поддерживается.
  • Значок ❌ означает, что версия Alpine или версия .NET в таком выпуске Alpine не поддерживается.
  • Если значок ✔️ стоит как напротив версии Alpine, так и напротив версии .NET, это значит, что такое сочетание ОС и .NET поддерживается.
Alpine .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 3.13 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 3.12 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 3.11 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 3.10 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
❌ 3.9 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
❌ 3.8 ✔️ 2.1 ✔️ 3.1 ❌ 5.0

Дополнительные сведения см. в статье об установке .NET в Alpine.

CentOS

CentOS 7 использует Yum в качестве диспетчера пакетов, а CentOS 8 использует DNF.

В приведенной ниже таблице содержится список поддерживаемых сейчас выпусков .NET в CentOS 7 и CentOS 8. Эти версии поддерживаются до того же времени, что и версия .NET или CentOS.

CentOS .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 8 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 7 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0

Дополнительные сведения см. в статье об установке .NET в CentOS.

Debian

Debian использует APT (Advanced Package Tool) в качестве диспетчера пакетов.

В приведенной ниже таблице содержится список поддерживаемых сейчас выпусков .NET и версий Debian, в которых они поддерживаются. Эти версии поддерживаются до того же времени, что и версия .NET или Debian.

  • Значок ✔️ означает, что версия Debian или .NET поддерживается.
  • Значок ❌ означает, что версия Debian или версия .NET в таком выпуске Debian не поддерживается.
  • Если значок ✔️ стоит как напротив версии Debian, так и напротив версии .NET, это значит, что такое сочетание ОС и .NET поддерживается.
Debian .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 11 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 10 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 9 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
❌ 8 ✔️ 2.1 ❌ 3.1 ❌ 5.0

Дополнительные сведения см. в статье об установке .NET в Debian.

Fedora

Fedora использует DNF в качестве диспетчера пакетов.

В приведенной ниже таблице содержится список поддерживаемых сейчас выпусков .NET и версий Fedora, в которых они поддерживаются. Эти версии поддерживаются до того же времени, что и версия .NET или Fedora.

  • Значок ✔️ означает, что версия Fedora или .NET поддерживается.
  • Значок ❌ означает, что версия Fedora или версия .NET в таком выпуске Fedora не поддерживается.
  • Если значок ✔️ стоит как напротив версии Fedora, так и напротив версии .NET, это значит, что такое сочетание ОС и .NET поддерживается.
Fedora .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 34 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 33 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 32 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
❌ 31 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
❌ 30 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
❌ 29 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
❌ 28 ✔️ 2.1 ❌ 3.1 ❌ 5.0
❌ 27 ✔️ 2.1 ❌ 3.1 ❌ 5.0

Дополнительные сведения см. в статье об установке .NET в Fedora.

openSUSE

openSUSE использует zypper в качестве диспетчера пакетов.

В следующей таблице приведен список выпусков .NET, которые сейчас поддерживаются в openSUSE 15. Эти версии поддерживаются до тех пор, пока для версии .NET или версии openSUSE не будет прекращена поддержка.

openSUSE .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 15 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0

Дополнительные сведения см. в статье об установке .NET в openSUSE.

Red Hat

Red Hat Enterprise Linux (RHEL) использует yum (RHEL 7) и DNF (RHEL 8) в качестве диспетчера пакетов.

В приведенной ниже таблице содержится список поддерживаемых сейчас выпусков .NET в RHEL 7 и RHEL 8. Эти версии поддерживаются до того же времени, что и версия .NET или RHEL.

  • Значок ✔️ означает, что версия RHEL или .NET поддерживается.
  • Значок ❌ означает, что версия RHEL или версия .NET в таком выпуске RHEL не поддерживается.
  • Если значок ✔️ стоит как напротив версии RHEL, так и напротив версии .NET, это значит, что такое сочетание ОС и .NET поддерживается.
RHEL .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 8 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 7 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0

Дополнительные сведения см. в статье об установке .NET в RHEL.

SLES использует zypper в качестве диспетчера пакетов.

В следующей таблице приведен список выпусков .NET, которые сейчас поддерживаются в SLES 12 SP2 и SLES 15. Эти версии поддерживаются до тех пор, пока для версии .NET или версии SLES не будет прекращена поддержка.

  • Значок ✔️ означает, что версия SLES или .NET поддерживается.
  • Значок ❌ означает, что версия SLES или версия .NET в таком выпуске SLES не поддерживается.
  • Если значок ✔️ стоит как напротив версии SLES, так и напротив версии .NET, это значит, что такое сочетание ОС и .NET поддерживается.
SLES .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 15 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 12 SP2 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0

Дополнительные сведения см. в статье об установке .NET в SLES.

Ubuntu

Ubuntu использует APT (Advanced Package Tool) в качестве диспетчера пакетов.

В приведенной ниже таблице содержатся сведения о поддержке Ubuntu и .NET.

  • Значок ✔️ означает, что версия Ubuntu или .NET поддерживается.
  • Значок ❌ означает, что версия Ubuntu или версия .NET в таком выпуске Ubuntu не поддерживается.
  • Если значок ✔️ стоит как напротив версии Ubuntu, так и напротив версии .NET, это значит, что такое сочетание ОС и .NET поддерживается.
Ubuntu .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 21.04 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
❌ 20.10 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 20.04 (LTS) ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
❌ 19.10 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
❌ 19.04 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
❌ 18.10 ✔️ 2.1 ❌ 3.1 ❌ 5.0
✔️ 18.04 (LTS) ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
❌ 17.10 ✔️ 2.1 ❌ 3.1 ❌ 5.0
❌ 17.04 ✔️ 2.1 ❌ 3.1 ❌ 5.0
❌ 16.10 ❌ 2.1 ❌ 3.1 ❌ 5.0
✔️ 16.04 (LTS) ✔️ 2.1 ✔️ 3.1 ✔️ 5.0

Дополнительные сведения см. в статье об установке .NET в Ubuntu.

Источник

Читайте также:  Как установить ar9285 wireless network adapter драйвер windows
Оцените статью