无法在 Debian 9.8 上将 Mono 更新到版本 5.18

无法在 Debian 9.8 上将 Mono 更新到版本 5.18

我无法更新单核细胞增多症Debian 9.8 上从版本 4.6.2 到 5.18.0。我按照说明进行操作下载页面在 Mono 的网站上,但到目前为止还没有运气。

root@server ~ # mono --version
Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen

root@server ~ # cat /etc/apt/sources.list.d/mono-official-stable.list
deb https://download.mono-project.com/repo/debian stable-stretch main

root@server ~ # apt update
Hit:1 http://security.debian.org stable/updates InRelease
Hit:2 http://security.debian.org testing/updates InRelease
Ign:3 http://deb.debian.org/debian stable InRelease
Hit:4 http://ftp.debian.org/debian stretch-backports InRelease
Hit:5 http://deb.debian.org/debian stable-updates InRelease
Ign:6 http://ftp.de.debian.org/debian stable InRelease
Hit:7 http://deb.debian.org/debian-security stable/updates InRelease
Hit:8 http://deb.debian.org/debian stable Release
Hit:9 http://ftp.de.debian.org/debian testing InRelease
Hit:10 http://ftp.de.debian.org/debian stable Release
Hit:11 https://download.mono-project.com/repo/debian stable-stretch InRelease
Hit:12 https://packages.sury.org/php stretch InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

root@server ~ # apt list --upgradable
Listing... Done
libgd3/testing 2.2.5-5.1 amd64 [upgradable from: 2.2.5-5+0~20190119054529.2+stretch~1.gbp911a4a]
libsodium23/testing 1.0.17-1 amd64 [upgradable from: 1.0.17-0.1+0~20190131101845.5+stretch~1.gbp8cf594]

更新1

添加了sudo apt install mono-devel mono-complete输出。

root@server ~ # sudo apt install mono-devel mono-complete
Reading package lists... Done
Building dependency tree
Reading state information... Done
mono-complete is already the newest version (4.6.2.7+dfsg-1).
mono-devel is already the newest version (4.6.2.7+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

更新2

/var/lib/apt/lists/只有partial空目录。

root@server /var/lib/apt/lists # ls -al
total 28
drwxr-xr-x 3 root root 12288 Feb 23 07:53 .
drwxr-xr-x 5 root root  4096 Feb 22 20:38 ..
drwx------ 2 _apt root 12288 Feb 22 20:38 partial

root@server /var/lib/apt/lists # cd partial/

root@server /var/lib/apt/lists/partial # ls -al
total 24
drwx------ 2 _apt root 12288 Feb 22 20:38 .
drwxr-xr-x 3 root root 12288 Feb 23 07:53 ..

运行时出错apt full-upgrade

root@server ~ # apt full-upgrade
Reading package lists... Done
E: The value 'stable' is invalid for APT::Default-Release as such a release is not available in the sources

运行后出现相同的错误aptitude,如屏幕截图所示。

资质


更新3

添加了/etc/apt/apt.conf.d/99server输出。

root@server /etc/apt/apt.conf.d # cat 99server
Acquire::PDiffs "false";
Acquire::Languages "en";
APT::Default-Release "stable";

更新4

当我尝试使用强制安装 Mono 5.18.0 时,sudo apt-get install mono-devel/stable-stretch出现如下错误。

root@server ~ # sudo apt-get install mono-devel/stable-stretch
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '5.18.0.240-0xamarin1+debian9b1' (Xamarin-Stable-Stretch:9.0/stable-stretch [all]) for 'mono-devel'
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:
 libmono-system-web-services4.0-cil : Depends: libmono-system-design4.0-cil (>= 1.0) but it is not going to be installed
 mono-devel : Depends: libmono-i18n4.0-cil (>= 4.0.0~alpha1) but it is not going to be installed
              Depends: libmono-system-design4.0-cil (>= 1.0) but it is not going to be installed
              Depends: libmono-system-drawing-design4.0-cil (>= 1.0) but it is not going to be installed
              Depends: libmono-system-messaging4.0-cil (>= 2.10.1) but it is not going to be installed
              Depends: libmono-system-runtime4.0-cil (>= 2.10.1) but it is not going to be installed
              Depends: libmono-system-servicemodel-activation4.0-cil (>= 1.0) but it is not going to be installed
              Depends: libmono-system-servicemodel-web4.0-cil (>= 3.2.1) but it is not going to be installed
              Depends: libmono-system-servicemodel4.0a-cil (>= 3.2.3) but it is not going to be installed
              Depends: libmono-system-web-extensions4.0-cil (>= 2.10.3) but it is not going to be installed
              Depends: libmono-system-web-webpages-razor2.0-cil (>= 1.0) but it is not going to be installed
              Depends: libmono-system-web-webpages2.0-cil (>= 1.0) but it is not going to be installed
              Depends: libmono-system-windows-forms4.0-cil (>= 1.0) but it is not going to be installed
              Depends: libmono-cil-dev (= 5.18.0.240-0xamarin1+debian9b1) but it is not going to be installed
              Recommends: msbuild but it is not going to be installed
 monodoc-manual : Depends: monodoc-browser but it is not going to be installed or
                           monodoc-http but it is not going to be installed or
                           monodoc-viewer
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

答案1

如果不仔细检查您的 apt 配置,就很难提出一个简单的命令集来解决这个问题。但是,那Debian 参考卡提到了解决方案的几个合乎逻辑的后续步骤。

  1. rm /var/lib/apt/lists/*将从您配置的源中删除所有缓存的包列表,并强制您的下一次调用apt update从每个远程服务器检索最新的清单
  2. apt full-upgrade将高级冲突解决方案应用于可用软件包版本的评估,并可以生成更积极的软件包组合进行升级
  3. aptitude将允许您详细检查您希望 apt 知道的软件包的所有版本以及它在决定升级它们或保留它们时使用的逻辑,以及允许您替换您的判断并解决任何冲突觉得合适

相关内容