Recently I had to reinstall Ubuntu. After returning to Ubuntu 22.04 I restored my /usr/local/
and var
folders which caused huge mess in terms of packages being written as installed although when one tries to type the command in terminal they don't seem installed.
Normally I follow the advice from here and it fixes the mess but this time I think I made a bigger mess. As Pinta could not be installed due to mono-runtime
not configured I removed them both from the system. Now mono-runtime
seems to be installed but not configured: when I type sudo apt install mono-runtime
I get
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
mono-runtime is already the newest version (6.8.0.105+dfsg-3.2).
mono-runtime set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
but then when I type Y
I get
Setting up mono-runtime (6.8.0.105+dfsg-3.2) ...
update-alternatives: error: alternative path /usr/bin/mono doesn't exist
dpkg: error processing package mono-runtime (--configure):
installed mono-runtime package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of libmono-i18n4.0-cil:
libmono-i18n4.0-cil depends on mono-runtime (>= 6.8.0.105); however:
Package mono-runtime is not configured yet.
libmono-i18n4.0-cil depends on mono-runtime (<< 6.8.0.106); however:
Package mono-runtime is not configured yet.
dpkg: error processing package libmono-i18n4.0-cil (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libmono-i18n-west4.0-cil:
libmono-i18n-west4.0-cil depends on libmono-i18n4.0-cil (>= 4.0.0~alpha1); however:
Package libmono-i18n4.0-cil is not configured yet.
dpkg: error processing package libmono-i18n-west4.0-cil (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libmono-corlib4.5-cil:
libmono-corlib4.5-cil depends on mono-runtime (>= 6.8.0.105); however:
Package mono-runtime is not configured yet.
libmono-corlib4.5-cil dependNo apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
s on mono-runtime (<< 6.8.0.106); however:
Package mono-runtime is not configured yet.
dpkg: error processing package libmono-corlib4.5-cil (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mono-runtime
libmono-i18n4.0-cil
libmono-i18n-west4.0-cil
libmono-corlib4.5-cil
Does anybody has the slightest idea how to solve this problem without formatting the system all over again?
--reinstall
to see if it installs "from scratch". You can also try--reinstall
ing all of its dependencies using this answer. However, it is quite possible thatapt
is so broken it is harder to fix than to reinstall, and you will likely come across these kinds of issues again and again even if you get it working this time – Esther Jun 20 '22 at 14:15