将.Net Core 1.0升级到2.0 Ubuntu 16.10

时间:2018-06-01 18:01:52

标签: linux ubuntu .net-core

我正在尝试将.net核心版本从1.0升级到2.0,但我遇到了一些错误。我不擅长Linux,所以我不太了解发生了什么。

我跑:

apt-get install dotnet-sdk-2.1.4

我收到了这个错误:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dotnet-sdk-2.1.4 : Depends: dotnet-runtime-2.0.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

所以,我尝试安装dotnet-runtime-2.0.5,我得到了这个

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dotnet-runtime-2.0.5 : Depends: libicu55 but it is not installable
E: Unable to correct problems, you have held broken packages.

在此之后,我尝试安装libicu55,但我已经安装了libicu57。我不知道该怎么做。

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libicu55 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libicu55' has no installation candidate
betocastillo86@ubuntu-huellitas-prod:~$

你有什么想法吗?

1 个答案:

答案 0 :(得分:2)

  

所以干净安装Ubuntu 16.04就是......虽然有一个问题,   您可以选择LTS(长期支持)与否。我选择不这样做   因为它是一个虚拟机,我不介意更新的更新等......结果证明了这一点   .NET Core安装是一个坏主意!它似乎曾经   非LTS安装你最终安装了16.10已经安装了一些   更新版本的必需库,即名为libicu的东西   现在是57而不是所需的55。

来源:https://shazwazza.com/post/installing-net-core-101-on-ubuntu-1610/

尝试在您的计算机上手动安装libicu55(它应与您计算机上的新版本并行运行):

  1. 从此处下载文件:http://packages.ubuntu.com/en/xenial/amd64/libicu55/download
  2. 使用以下内容进行安装:sudo dpkg –i libicu55_55.1-7_amd64.deb