当我尝试升级我的软件包时,我收到一条消息,提示我curl
已libcurl3
被阻止。我没有亲自执行此操作。
参照“以下包裹已被保留:”为什么以及我该如何解决?,当我尝试时apt install curl
,libcurl3
它失败了,因为curl
取决于libcurl4
。
当我尝试安装时libcurl4
,收到以下输出:
The following packages were automatically installed and are no longer required:
aspnetcore-store-2.0.0 aspnetcore-store-2.0.3 aspnetcore-store-2.0.5 dotnet-host dotnet-hostfxr-2.0.5 dotnet-runtime-deps-2.1.0-rc1 liblttng-ust-ctl4
liblttng-ust0 liburcu6
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
curl
The following packages will be REMOVED:
dotnet-runtime-2.0.5 dotnet-sdk-2.1.4 libcurl3
The following NEW packages will be installed:
libcurl4
The following packages will be upgraded:
curl
卸载 .NET Core 不是一个选项。我可以放心地忽略curl
被阻止的事实吗?.NET Core 最终会更新以使用新curl
版本吗?还有第三个选项吗?
提前谢谢!
Ubuntu 18.04。最新更新。Dot Net 通过 apt 从官方仓库安装
按照要求,apt-cache policy dotnet-runtime-2.0.5 dotnet-sdk-2.1.4 curl libcurl3 libcurl4
:
dotnet-runtime-2.0.5:
Installed: 2.0.5-1
Candidate: 2.0.5-1
Version table:
*** 2.0.5-1 100
100 /var/lib/dpkg/status
dotnet-sdk-2.1.4:
Installed: 2.1.4-1
Candidate: 2.1.4-1
Version table:
*** 2.1.4-1 100
100 /var/lib/dpkg/status
curl:
Installed: 7.55.1-1ubuntu2.5
Candidate: 7.58.0-2ubuntu3.2
Version table:
7.58.0-2ubuntu3.2 500
500 http://au.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
7.58.0-2ubuntu3 500
500 http://au.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
*** 7.55.1-1ubuntu2.5 100
100 /var/lib/dpkg/status
libcurl3:
Installed: 7.55.1-1ubuntu2.5
Candidate: 7.58.0-2ubuntu2
Version table:
7.58.0-2ubuntu2 500
500 http://au.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
*** 7.55.1-1ubuntu2.5 100
100 /var/lib/dpkg/status
libcurl4:
Installed: (none)
Candidate: 7.58.0-2ubuntu3.2
Version table:
7.58.0-2ubuntu3.2 500
500 http://au.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
7.58.0-2ubuntu3 500
500 http://au.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
dpkg-query -s dotnet-runtime-2.0.5 dotnet-sdk-2.1.4
:
Package: dotnet-runtime-2.0.5
Status: install ok installed
Priority: standard
Section: libs
Installed-Size: 59412
Maintainer: Microsoft <[email protected]>
Architecture: amd64
Version: 2.0.5-1
Depends: libc6 (>= 2.14), libcurl3 (>= 7.16.2), libgcc1 (>= 1:3.0), libgssapi-krb5-2 (>= 1.14+dfsg), liblttng-ust0 (>= 2.5.0), libstdc++6 (>= 4.8), libunwind8, libuuid1 (>= 2.16), zlib1g (>= 1:1.1.4), libssl1.0.0, libicu57, dotnet-hostfxr-2.0.5
Description: Microsoft .NET Core Runtime - 2.0.5 Microsoft.NETCore.App 2.0.5
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
Homepage: https://dotnet.github.io
Package: dotnet-sdk-2.1.4
Status: install ok installed
Priority: standard
Section: devel
Installed-Size: 196263
Maintainer: Microsoft <[email protected]>
Architecture: amd64
Version: 2.1.4-1
Depends: dotnet-runtime-2.0.5, aspnetcore-store-2.0.5
Description: Microsoft .NET Core SDK - 2.1.4
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
Homepage: https://dotnet.github.io/core
答案1
问题出在dotnet-runtime-2.0.5
和之间不兼容libcurl4
。当前版本dotnet-runtime
使用libcurl4
而不是libcurl3
。我相信旧版本的运行时是从 17.10 升级到 18.04 后遗留的问题。
我重新添加了微软仓库,删除dotnet-runtime-2.0.5
并安装dotnet-runtime-2.1
,这使我能够升级curl
并依次安装libcurl4
所涉及的具体步骤如下:
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
此 deb 会自动将 .NET Core 存储库添加到系统中。然后我删除了旧软件包并安装了新版本:
sudo apt autoremove dotnet-runtime-2.0.5
sudo apt install dotnet-runtime-2.1 curl