How To Get Ubuntu Version

broken image


Contents

  1. Package management with APT
    1. Commands
      1. Installation commands
    2. Setting up apt-get to use a http-proxy

Download Ubuntu desktop, Ubuntu Server, Ubuntu for Raspberry Pi and IoT devices, Ubuntu Core and all the Ubuntu flavours. Ubuntu is an open-source software platform that runs everywhere from the PC to the server and the cloud. A ️ indicates that the version of Ubuntu or.NET is still supported. A indicates that the version of Ubuntu or.NET isn't supported on that Ubuntu release. When both a version of Ubuntu and a version of.NET have ️, that OS and.NET combination is supported.

Hi, About the method #1 According to 1 and 2, in order to get a kernel as newer as possible in a most convenient way, you should install 'linux-signed-generic-lts-XXX' (e.g., 'linux-signed-generic-lts-xenial') or unsigned version 'linux-generic-lts-XXX' (e.g., 'linux-generic-lts-xenial') for Ubuntu before LTS 16.04, even prefer to install the newer 'linux-signed. Ubuntu Advantage is the professional support package from the experts at Canonical. Get 24x7 support with access to engineers with first-hand experience of your issues. It includes Landscape, the systems management tool, for monitoring, managing, patching, and compliance reporting on all your Ubuntu desktops.

This article applies to all supported versions of Ubuntu

Package management via apt-get runs hand-in-hand with the /etc/apt/sources.list file. For information on editing or updating your sources list see SourcesList.

Introduction

This page describes how to handle the packages on your system using apt-get and related commands. For example, you can install a new package, remove an installed package, or update all installed packages to the latest versions.

Commands

All these commands except the search commands must be run as root or with superuser privileges, see sudo for more information.

  • Example:

Installation commands

  • This command installs a new package.
  • This command searches the repositories and installs the build dependencies for . If the package is not in the repositories it will return an error.

  • Aptitude is an Ncurses viewer of packages installed or available. Aptitude can be used from the command line in a similar way to apt-get. Enter man aptitude for more information.

  • APT and aptitude will accept multiple package names as a space delimited list. For example:

    Use the -s flag to simulate an action. For example: 'apt-get -s install ' will simulate installing the package, showing you what packages will be installed and configured.

auto-apt

  • This command runs under the control of auto-apt. If a program tries to access a file known to belong in an uninstalled package, auto-apt will install that package using apt-get. This feature requires apt and sudo to work.

  • Auto-apt keeps databases which need to be kept up-to-date in order for it to be effective. This is achieved by calling the commands auto-apt update, auto-apt updatedb and auto-apt update-local.
  • Usage example
    • You're compiling a program and, all of a sudden, there's an error because it needs a file you don't have. The program auto-apt asks you to install packages if they're needed, stopping the relevant process and continuing once the package is installed. It will then ask to install the needed packages and call apt-get automatically. If you're running X, a graphical interface will replace the default text interface.

Maintenance commands

  • Run this command after changing /etc/apt/sources.list or /etc/apt/preferences . For information regarding /etc/apt/preferences, see PinningHowto. Run this command periodically to make sure your source list is up-to-date. This is the equivalent of 'Reload' in Synaptic or 'Fetch updates' in Adept.

  • This command upgrades all installed packages. This is the equivalent of 'Mark all upgrades' in Synaptic.
  • The same as the above, except add the 'smart upgrade' checkbox. It tells APT to use 'smart' conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary.

    'apt-get dist-upgrade' does not upgrade from a previous version of Ubuntu. For more information of upgrading from a previous version of Ubuntu see http://www.ubuntu.com/getubuntu/upgrading .

  • This command is a diagnostic tool. It does an update of the package lists and checks for broken dependencies.
  • This command does the same thing as Edit->Fix Broken Packages in Synaptic. Do this if you get complaints about packages with 'unmet dependencies'.

  • This command removes .deb files for packages that are no longer installed on your system. Depending on your installation habits, removing these files from /var/cache/apt/archives may regain a significant amount of diskspace.

  • The same as above, except it removes all packages from the package cache. This may not be desirable if you have a slow Internet connection, since it will cause you to redownload any packages you need to install a program.

    • The package cache is in /var/cache/apt/archives . The command will tell you how much space cached packages are consuming.

  • Reconfigure the named package. With many packages, you'll be prompted with some configuration questions you may not have known were there.
    • For example: will present you with a 'wizard' on configuring fonts in Ubuntu.

  • This command places the desired package on hold.

    • This command may have the unintended side effect of preventing upgrades to packages that depend on updated versions of the pinned package. apt-get dist-upgrade will override this, but will warn you first. If you want to use this command with sudo, you need to use echo ' hold' | sudo dpkg --set-selectionsnotsudo echo ' hold' | dpkg --set-selections.

  • This command removes the 'hold' or 'locked package' state set by the above command. The note above about sudo usage applies to this command.

Removal commands

  • This command removes an installed package, leaving configuration files intact.
  • This command completely removes a package and the associated configuration files. Configuration files residing in ~ are not usually affected by this command.
    • + operator
      • If you want to remove package1 and install package2 in one step: .

  • This command removes packages that were installed by other packages and are no longer needed.
    • This command removes an installed package and dependencies.
  • While there is no built in way to remove all of your configuration information from your removed packages you can remove all configuration data from every removed package with the following command.

Search commands

  • Each package has a name and a description. This command lists packages whose name or description contains .

  • This will find packages whose names contain . Similar to apt-cache search, but also shows whether a package is installed on your system by marking it with ii (installed) and un (not installed).

  • This command shows the description of package and other relevant information including version, size, dependencies and conflicts.

  • This command is similar to 'apt-cache show'.
  • This command will list files in package .

  • This command lists files in the package 'foo.deb'. Note that foo.deb is a pathname. Use this command on .deb packages that you have manually downloaded.

  • This command determines which installed package owns . It shows files from installed packages that match , with the name of the package they came from. Consider this to be a 'reverse lookup' utility.

    In order to use this command, the package dlocate must be installed on your system.

  • This command does the same as dlocate, but does not require the installation of any additional packages. It is slower than dlocate but has the advantage of being installed by default on all Debian and Ubuntu systems.

  • This command acts like dlocate and dpkg -S, but searches all available packages. It answers the question, 'what package provides this file?'.

    • apt-file needs to be updated regularly like apt-get. Use the command:

    In order to use this command, the package apt-file must be installed on your system.

  • This command provides a listing of every package in the system
  • A general note on searching: If searching generates a list that is too long, you can filter your results by piping them through the command grep. Examples:

    • will show only the files that contain as a whole word

    • will list files located in the directory /usr/bin, useful if you're looking for a particular executable.

For more information on apt-get, apt-cache and dpkg consult their manual pages by using the man command. These manuals will provide a wider scope of information in addition to all of the options that you can use with each program.

  • Example: .

Typical usage example

I want to feel the wind in my hair, I want the adrenaline of speed. So let's install a racing game. But what racing games are available?

It gives me a lot of answers. I see a game named 'torcs'. Let's get some more information on this game.

Hmmm.. it seems interesting. But is this game not already installed on my computer? And what is the available version? Which repository is it from (Universe or Main)?

Ok, so now, let's install it!

What is the command I must type in the console to launch this game? In this example, it's straightforward ('torcs'), but that's not always the case. One way of finding the name of the binary is to look at what files the package has installed in '/usr/bin'. For games, the binary will be in '/usr/games'. For administrative programs, it's in '/usr/sbin'.

The first part of the command display all files installed by the package 'torcs' (try it). With the second part, we ask to only display lines containing '/usr/games/'.

Hmmm, that game is cool. Maybe there are some extra tracks?

But I'm running out of space. I will delete the apt cache!

Oh no, my mother asked me to remove all games from this computer. But I want to keep the configuration files so I can simply re-install it later.

If I want to also remove config files :

Setting up apt-get to use a http-proxy

These are three methods of using apt-get with a http-proxy.

Temporary proxy session

This is a temporary method that you can manually use each time you want to use apt-get through a http-proxy. This method is useful if you only want to temporarily use a http-proxy.

Enter this line in the terminal prior to using apt-get (substitute your details for yourproxyaddress and proxyport).

If you normally use sudo to run apt-get you will need to login as root first for this to work unless you also add some explicit environment settings to /etc/sudoers, e.g.

APT configuration file method

This method uses the apt.conf file which is found in your /etc/apt/ directory. This method is useful if you only want apt-get (and not other applications) to use a http-proxy permanently.

On some installations there will be no apt-conf file set up. This procedure will either edit an existing apt-conf file or create a new apt-conf file.

Add this line to your /etc/apt/apt.conf file (substitute your details for yourproxyaddress and proxyport).

Save the apt.conf file.

BASH rc method

This method adds a two lines to your .bashrc file in your $HOME directory. This method is useful if you would like apt-get and other applications for instance wget, to use a http-proxy.

Add these lines to the bottom of your ~/.bashrc file (substitute your details for yourproxyaddress and proxyport)

Save the file. Close your terminal window and then open another terminal window or source the ~/.bashrc file:

Test your proxy with sudo apt-get update and whatever networking tool you desire. You can use firestarter or conky to see active connections.

If you make a mistake and go back to edit the file again, you can close the terminal and reopen it or you can source ~/.bashrc as shown above.

How to login a proxy user

If you need to login to the Proxy server this can be achieved in most cases by using the following layout in specifying the proxy address in http-proxy. (substitute your details for username, password, yourproxyaddress and proxyport)

Useful additional packages

  • Deborphan

  • Debfoster

Additional links

  • Repositories/CommandLine

  • PinningHowto

  • How to design 3d prints. AutoDeb

  • Synaptic Package Manager

  • Ubuntu Community Forums: Installations and Upgrades

  • How to speed up package updates using apt-fast

Troubleshooting

  • https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure

CategoryPackageManagementCategoryCommandLine

-->

.NET is supported on Ubuntu. This article describes how to install .NET on Ubuntu. When an Ubuntu version falls out of support, .NET is no longer supported with that version.

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.

Important

Package manager installs are only supported on the x64 architecture. Other architectures, such as ARM How to shoot in roblox mobile. , must install .NET by some other means such as with Snap, an installer script, or through a manual binary installation.

For more information on installing .NET without a package manager, see one of the following articles:

Supported distributions

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

  • A ✔️ indicates that the version of Ubuntu or .NET is still supported.
  • A ❌ indicates that the version of Ubuntu or .NET isn't supported on that Ubuntu release.
  • When both a version of Ubuntu and a version of .NET have ✔️, that OS and .NET combination is supported.
Ubuntu.NET Core 2.1.NET Core 3.1.NET 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

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

  • 3.0
  • 2.2
  • 2.0

Remove preview versions

When using a package manager to manage your installation of .NET, you may run into a conflict if you've previously installed a preview release. The package manager may interpret the non-preview release as an earlier version of .NET. To install the non-preview release, first uninstall the preview versions. For more information about uninstalling .NET, see How to remove the .NET Runtime and SDK.

20.10 ✔️

Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.

Open a terminal and run the following commands:

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:

Important

If you receive an error message similar to Unable to locate package dotnet-sdk-5.0, see the APT 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:

Important

If you receive an error message similar to Unable to locate package aspnetcore-runtime-5.0, see the APT 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-5.0 in the previous command with dotnet-runtime-5.0:

20.04 ✔️

Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.

Open a terminal and run the following commands:

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:

Important

If you receive an error message similar to Unable to locate package dotnet-sdk-5.0, see the APT 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:

Important

If you receive an error message similar to Unable to locate package aspnetcore-runtime-5.0, see the APT 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-5.0 in the previous command with dotnet-runtime-5.0:

19.10 ❌

❌ Please note that this version of Ubuntu is no longer supported.

Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.

Open a terminal and run the following commands:

Install the SDK

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

Important

If you receive an error message similar to Unable to locate package dotnet-sdk-3.1, see the APT troubleshooting section.

Install the runtime

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

Important

If you receive an error message similar to Unable to locate package aspnetcore-runtime-3.1, see the APT troubleshooting section.

As an alternative to the ASP.NET Core Runtime, you can install the .NET Core Runtime, which doesn't include ASP.NET Core support: replace aspnetcore-runtime-3.1 in the previous command with dotnet-runtime-3.1.

19.04 ❌

❌ Please note that this version of Ubuntu is no longer supported.

Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.

Open a terminal and run the following commands:

Install the SDK

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

Important

If you receive an error message similar to Unable to locate package dotnet-sdk-3.1, see the APT troubleshooting section.

Install the runtime

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

Important

If you receive an error message similar to Unable to locate package aspnetcore-runtime-3.1, see the APT troubleshooting section.

As an alternative to the ASP.NET Core Runtime, you can install the .NET Core Runtime, which doesn't include ASP.NET Core support: replace aspnetcore-runtime-3.1 in the previous command with dotnet-runtime-3.1.

18.10 ❌

❌ Please note that this version of Ubuntu is no longer supported.

Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.

Open a terminal and run the following commands:

Install the SDK

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

Important

If you receive an error message similar to Unable to locate package dotnet-sdk-2.1, see the APT troubleshooting section.

Install the runtime

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

Which Ubuntu Version

Important

If you receive an error message similar to Unable to locate package aspnetcore-runtime-2.1, see the APT troubleshooting section.

As an alternative to the ASP.NET Core Runtime, you can install the .NET Core Runtime, which doesn't include ASP.NET Core support: replace aspnetcore-runtime-2.1 in the previous command with dotnet-runtime-2.1.

18.04 ✔️

Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.

Open a terminal and run the following commands:

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:

Important

If you receive an error message similar to Unable to locate package dotnet-sdk-5.0, see the APT 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:

Important

If you receive an error message similar to Unable to locate package aspnetcore-runtime-5.0, see the APT 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-5.0 in the previous command with dotnet-runtime-5.0:

17.10 ❌

❌ Please note that this version of Ubuntu is no longer supported.

Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.

Open a terminal and run the following commands:

Install the SDK

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

Important

If you receive an error message similar to Unable to locate package dotnet-sdk-2.1, see the APT troubleshooting section.

Install the runtime

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

Important

If you receive an error message similar to Unable to locate package aspnetcore-runtime-2.1, see the APT troubleshooting section.

As an alternative to the ASP.NET Core Runtime, you can install the .NET Core Runtime, which doesn't include ASP.NET Core support: replace aspnetcore-runtime-2.1 in the previous command with dotnet-runtime-2.1.

17.04 ❌

❌ Please note that this version of Ubuntu is no longer supported.

Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.

Open a terminal and run the following commands:

Install the SDK

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

Important

If you receive an error message similar to Unable to locate package dotnet-sdk-2.1, see the APT troubleshooting section.

Install the runtime

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

Important

If you receive an error message similar to Unable to locate package aspnetcore-runtime-2.1, see the APT troubleshooting section.

As an alternative to the ASP.NET Core Runtime, you can install the .NET Core Runtime, which doesn't include ASP.NET Core support: replace aspnetcore-runtime-2.1 in the previous command with dotnet-runtime-2.1.

16.10 ❌

How to install chrome browser. ❌ Please note that this version of Ubuntu is no longer supported.

Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.

Open a terminal and run the following commands:

Install the SDK

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

Important

If you receive an error message similar to Unable to locate package dotnet-sdk-2.1, see the APT troubleshooting section.

Get Ubuntu Version Cli

Install the runtime

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

How To Get Ubuntu Version Console

Important

If you receive an error message similar to Unable to locate package aspnetcore-runtime-2.1, see the APT troubleshooting section.

As an alternative to the ASP.NET Core Runtime, you can install the .NET Core Runtime, which doesn't include ASP.NET Core support: replace aspnetcore-runtime-2.1 in the previous command with dotnet-runtime-2.1.

16.04 ✔️

How To Get Ubuntu Version

Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.

Open a terminal and run the following commands:

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:

Important

If you receive an error message similar to Unable to locate package dotnet-sdk-5.0, see the APT 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:

Important

If you receive an error message similar to Unable to locate package aspnetcore-runtime-5.0, see the APT 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-5.0 in the previous command with dotnet-runtime-5.0:

How to install other versions

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

  • product
    The type of .NET product to install. Valid options are:

    • dotnet
    • aspnetcore
  • type
    Chooses the SDK or the runtime. Valid options are:

    • sdk
    • 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:

    • 5.0
    • 3.1
    • 3.0
    • 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 .NET Core dependencies and requirements.

Examples

  • Install the ASP.NET Core 5.0 runtime: aspnetcore-runtime-5.0
  • Install the .NET Core 2.1 runtime: dotnet-runtime-2.1
  • Install the .NET 5.0 SDK: dotnet-sdk-5.0
  • Install the .NET Core 3.1 SDK: dotnet-sdk-3.1

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-2.2 is incorrect and should be dotnet-sdk-2.2. For a list of Linux distributions supported by .NET Core, see .NET dependencies and requirements.

Use APT to update .NET

When a new patch release is available for .NET, you can simply upgrade it through APT with the following commands:

APT troubleshooting

This section provides information on common errors you may get while using APT to install .NET.

Unable to find package

Important

Package manager installs are only supported on the x64 architecture. Other architectures, such as ARM, must install .NET by some other means such as with Snap, an installer script, or through a manual binary installation.

For more information on installing .NET without a package manager, see one of the following articles:

Unable to locate Some packages could not be installed

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.

There are two placeholders in the following set of commands.

  • {dotnet-package}
    This represents the .NET package you're installing, such as aspnetcore-runtime-3.1. 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:

Then, try to install .NET again. If that doesn't work, you can run a manual install with the following commands:

Failed to fetch

While installing the .NET package, you may see an error similar to Failed to fetch .. File has unexpected size .. Mirror sync in progress?. This error could mean that the package feed for .NET is being upgraded with newer package versions, and that you should try again later. During an upgrade, the package feed shouldn't be unavailable for more than 30 minutes. If you continually receive this error for more than 30 minutes, please file an issue at https://github.com/dotnet/core/issues.

Dependencies

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:

  • libc6
  • libgcc1
  • libgssapi-krb5-2
  • libicu52 (for 14.x)
  • libicu55 (for 16.x)
  • libicu60 (for 18.x)
  • libicu66 (for 20.x)
  • libssl1.0.0 (for 14.x, 16.x)
  • libssl1.1 (for 18.x, 20.x)
  • libstdc++6
  • zlib1g

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

  • libgdiplus (version 6.0.1 or later)

    Warning

    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/.

Next steps





broken image