我在我的Ubuntu Server 18.10上已经安装了mono-complete和mono-devel几个月了,以便运行一些依赖于它的应用程序。我正在使用Mono 5.18.0.225版本。在出现问题之前,我进行了标准的sudo apt update,看到许多需要升级的mono软件包,然后执行了sudo apt upgrade。大部分安装过程都正常进行,但终端不断输出错误信息。无论我尝试做什么,这些几乎无休止的错误信息都会一遍又一遍地打印出来,持续几秒钟。
无法升级或移除软件。如果无法进行升级,我尝试了移除并重新安装,但移除也失败了。
错误信息中提到找不到gdb或lldb。于是我尝试手动编译和安装gdb,因为我无法使用apt... 尝试这样做会要求你运行
sudo apt upgrade
sudo apt --fix-broken install
sudo apt remove mono-complete mono-devel
sudo apt autoremove
无法升级或移除软件。如果无法进行升级,我尝试了移除并重新安装,但移除也失败了。
错误信息中提到找不到gdb或lldb。于是我尝试手动编译和安装gdb,因为我无法使用apt... 尝试这样做会要求你运行
sudo apt --fix-broken install
,结果还是出现了相同的错误。安装gdb-8.2成功了。打印出来的错误信息有些变化,包含了对gdb的引用(因为现在已经安装了),但仍然没有取得任何进展。
- 首先,为什么mono会出现问题?
- 为什么尝试移除软件包会产生错误?
- 应该采取什么措施来修复这个情况?我不想重新安装Ubuntu Server并重新设置所有内容。
关于错误打印出来的内容(在安装gdb之前):
Aborted (core dumped)
E: installing Assembly /usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.gtk-sharp.dll failed
E: Installation of policy.2.8.gtk-sharp with /usr/share/cli-common/runtimes.d/mono failed
* Installing 1 assembly from policy.2.8.pango-sharp into Mono
Stacktrace:
/proc/self/maps:
41308000-41338000 rwxp 00000000 00:00 0
55b153398000-55b1537e1000 r-xp 00000000 08:02 3159129 /usr/bin/mono-sgen
... cutting some of this out ...
7fb557c3b000-7fb557c88000 r--p 00000000 08:02 3160431 /usr/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll
Memory around native instruction pointer (0x7fb5556e2c8f):
0x7fb5556e2c7f 20 48 09 d6 41 0f b6 53 05 48 c1 e2 28 48 09 f2 H..A..S.H..(H..
0x7fb5556e2c8f 66 41 0f 38 32 4b 06 66 0f 6f 05 b2 82 49 00 66 fA.82K.f.o...I.f
0x7fb5556e2c9f 0f 38 00 c8 66 48 0f 7e c8 66 48 0f 3a 16 ce 01 .8..fH.~.fH.:...
0x7fb5556e2caf 48 09 c6 48 09 d6 41 0f b6 c2 41 0f b6 53 09 48 H..H..A...A..S.H
Native stacktrace:
/usr/bin/mono(+0x129f8d) [0x55b1534c1f8d]
/usr/bin/mono(+0x12a295) [0x55b1534c2295]
/usr/bin/mono(+0xbfd2f) [0x55b153457d2f]
/usr/bin/mono(+0x414e8) [0x55b1533d94e8]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12dd0) [0x7fb558343dd0]
/usr/lib/mono/aot-cache/amd64/mscorlib.dll.so(+0x123c8f) [0x7fb5556e2c8f]
Waiting for dumping threads to resume
Debug info from gdb:
mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb
=================================================================
Got a SIGILL while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Aborted (core dumped)
E: installing Assembly /usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.pango-sharp.dll failed
E: Installation of policy.2.8.pango-sharp with /usr/share/cli-common/runtimes.d/mono failed
^[[1mdpkg:^[[0m error processing package mono-gac (--configure):
installed mono-gac package post-installation script subprocess returned error exit status 29
apt remove
,因为它显示dpkg被中断了,我必须手动运行sudo dpkg --configure -a
,但是这个命令只会导致上述错误。 - Aaron Frankesudo dpkg --force-all -P ca-certificates-mono
,因为sudo apt --fix-broken install
和其他任何“修复”方法都没有起作用,所以我以同样的方式删除了所有的mono。特别是像sudo dpkg --force-all -P mono-common mono-devel
和sudo dpkg --force-all -P mono-4.0-gac mono-gac
这样的东西,在更新、升级以及使用'--fix-broken install'和'autoremove'进行修复后,清理了剩下的部分。最终得分:$ mono --version Mono JIT编译器版本6.0.0.319(tarball Fri Aug 9 16:23:57 UTC 2019).... - user309383