Updated in Ubuntu. Netcore to version 2.1

Source: Internet
Author: User
Tags dotnet

If you need to install a new version to Dotnetcore, you need to uninstall the old version (https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.1.1 -DOWNLOAD.MD), after using dotnet--version to view the current version, execute the uninstall command:

Apt Remove  2.0.0-preview1-005977

After the uninstallation is complete, follow the official website prompt: (https://www.microsoft.com/net/download/linux-package-manager/ubuntu16-04/sdk-current)

Wget-q Https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.debsudo Dpkg-i Packages-microsoft-prod.debsudo apt-get Install Apt-transport-httpssudo apt-get updatesudo apt-get Install dotnet-sdk-2.1

However, there is no successful installation, prompt:

The following packages have unsatisfied dependencies: dotnet-sdk-2.1: Dependent: dotnet-runtime-2.1 (>= 2.1.1) but it will not be installed                  dependent on: aspnetcore-runtime-2.1 (>= 2.1.1) but it will not be installed E: cannot fix the error, because you require certain packages to remain current, that is, they destroy the dependencies between the software packages. 

With dependency issues, you can choose to install the following aptitude This management tool, like aptitude and apt-get, is extremely powerful in Debian and its derivative systems to package management tools. Unlike Apt-get, aptitude is better at dealing with dependency issues, for example, when aptitude deletes a package, it deletes the packages it relies on, so that no unused packets are left in the system and the system is cleaner. To execute the installation command:

Apt-get Install aptitude

After the installation is complete, install using aptitude. Netcore can be prompted as follows:

The following "new" packages will be installed.
Aspnetcore-runtime-2.1{a} Dotnet-host{a} Dotnet-hostfxr-2.1{a}
Dotnet-runtime-2.1{a} Dotnet-runtime-deps-2.1{ab} dotnet-sdk-2.1
0 Packages are upgraded, 6 new installations, 0 will be removed, and 1 will not be upgraded.
You need to get the MB archive. 376 MB will be used after unpacking.
An unsatisfied dependency exists for the following packages:
dotnet-runtime-deps-2.1: Dependent: libicu55 which is a vsan and is not provided by any available package

The following actions will resolve these dependencies:

Keep the following packages in their current version:
1) aspnetcore-runtime-2.1 [not installed]
2) dotnet-runtime-2.1 [not installed]
3) dotnet-runtime-deps-2.1 [not installed]
4) dotnet-sdk-2.1 [not installed]

Do you accept this solution? [y/n/q/?] Y

This should see the crux of the problem, the reason is not installed, because there is no source can provide libicu55 this package, online search the following, in https://packages.ubuntu.com/zh-cn/xenial/amd64/ Libicu55/download found on this site, need to be in /etc/apt/sources.list中增加镜像源: Deb Http://security.ubuntu.com/ubuntu xenial-security Main, add good later, execute Apt-get The update command updates the LIBICU55, and finally executes the sudo apt-get install dotnet-sdk-2.1 to install the Dotnetcore 2.1 successfully.

This software may collect information on you and your UseOf the software, and send this to Microsoft.Please visit http:Aka.ms/dotnet-cli-eula forMore information.Welcome to.NETCore!---------------------Learn more about.NETcore:https://aka.ms/Dotnet-docs Use' Dotnet--help ' to see available commands or visit:https://aka.ms/dotnet-cli-docstelemetry--------- the.NETCore Tools collect usage data in order to help us improve your experience. The data is anonymous and doesn ' t includeCommand-line arguments. The data is collected by Microsoft and GKFX with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to ' 1 ' or ' true ' using your f AvoriteShell.Read More about.NETCore CLI Tools telemetry:https://aka.ms/dotnet-cli-telemetryconfiguring...--------------ACommandIs running to populate your local packageCacheTo improveRestoreSpeed and enable offline access. ThisCommandTakes up to one minute through and only runs once.

Seeing this, it means the installation was successful.

Updated in Ubuntu. Netcore to version 2.1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.