在ubuntu中安装dotnet core会出现依赖性冲突。

问题描述 投票:1回答:1

我之前在ubuntu中安装dotnetcore时没有任何问题。但有时我在早期版本中会遇到依赖性问题,但总是在ubuntu 20.04中。

我正在按照提供的指导进行安装 此处

每当我试图安装 sudo apt-get install dotnet-sdk-3.1 它显示了依赖性问题。

以下包有未满足的依赖关系。

dotnet-sdk-3.1 : 取决于:dotnet-runtim-3.1 (>= 3.1.3),但它不会被安装。

取决于:aspnetcore-runtime-3.1 (>= 3.1.3),但它不会被安装。

E:无法改正问题,您已持有破损的包。

我试着把每一个包都逐一添加,最终 sudo apt install dotnet-sdk-3.1 dotnet-runtime-3.1 aspnetcore-runtime-3.1 dotnet-runtime-deps-3.1.

The following packages have unmet dependencies:
 dotnet-runtime-deps-3.1 : Depends: libicu but it is not installable or
                                    libicu63 but it is not installable or
                                    libicu60 but it is not installable or
                                    libicu57 but it is not installable or
                                    libicu55 but it is not installable or
                                    libicu52 but it is not installable

现在 apt-cache policy libicu (或任何libicu63等)显示没有安装候选人。

libicu:已安装。(none) Candidate: (none) 版本表。

我不知道为什么会出现这种情况以及如何解决。

ubuntu .net-core apt
1个回答
1
投票

这里正在讨论 - https:/github.comdotnetcoreissues4616。 的复制品 https:/github.comdotnetcoreissues4360。)

你可以做以下的变通方法。

步骤。

$ wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u4_amd64.deb
$ sudo dpkg -i libicu57_57.1-6+deb9u4_amd64.deb
$ sudo apt install dotnet-sdk-3.1

$ dotnet --version
3.1.201

对我来说是可行的

© www.soinside.com 2019 - 2024. All rights reserved.