Моя машина - Ubuntu 16.04.
После того, как я попробовал обновить Mono, я столкнулся с проблемой зависимости.
sudo apt-get install mono-complete
Building dependency tree
Reading state information... Done
mono-complete is already the newest version (6.0.0.313-0xamarin3+ubuntu1604b1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
mono-complete : Depends: ca-certificates-mono (= 6.0.0.313-0xamarin3+ubuntu1604b1) but 4.8.1.0-0xamarin1 is to be installed
mono-devel : Depends: ca-certificates-mono (= 6.0.0.313-0xamarin3+ubuntu1604b1) but 4.8.1.0-0xamarin1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libio-string-perl libmono-corlib4.0-cil libmono-system-runtime-interopservices-runtimeinformation4.0-cil libnunit-cil-dev libnunit-console-runner2.6.3-cil libnunit-core-interfaces2.6.3-cil libnunit-core2.6.3-cil libnunit-framework2.6.3-cil libnunit-mocks2.6.3-cil
libnunit-util2.6.3-cil libtimedate-perl
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
ca-certificates-mono
The following packages will be upgraded:
ca-certificates-mono
1 upgraded, 0 newly installed, 0 to remove and 275 not upgraded.
161 not fully installed or removed.
Need to get 0 B/31.1 kB of archives.
After this operation, 24.6 kB disk space will be freed.
Do you want to continue? [Y/n] y
Setting up mono-gac (6.0.0.313-0xamarin3+ubuntu1604b1) ...
* Installing 1 assembly from libglade2.0-cil into Mono
Unhandled Exception:
System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.File.Exists (System.String path) [0x00043] in <81342d83acda4c5590ec19c7afdf26b9>:0
at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00028] in <23529d1919fc4cdeb9723008e6dfcc48>:0
at Mono.Tools.Driver.Main (System.String[] args) [0x00351] in <23529d1919fc4cdeb9723008e6dfcc48>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.File.Exists (System.String path) [0x00043] in <81342d83acda4c5590ec19c7afdf26b9>:0
at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00028] in <23529d1919fc4cdeb9723008e6dfcc48>:0
at Mono.Tools.Driver.Main (System.String[] args) [0x00351] in <23529d1919fc4cdeb9723008e6dfcc48>:0
E: installing Assembly /usr/lib/cli/glade-sharp-2.0/glade-sharp.dll failed
E: Installation of libglade2.0-cil with /usr/share/cli-common/runtimes.d/mono failed
* Installing 1 assembly from libglib2.0-cil into Mono
Unhandled Exception:
System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.File.Exists (System.String path) [0x00043] in <81342d83acda4c5590ec19c7afdf26b9>:0
at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00028] in <23529d1919fc4cdeb9723008e6dfcc48>:0
at Mono.Tools.Driver.Main (System.String[] args) [0x00351] in <23529d1919fc4cdeb9723008e6dfcc48>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.File.Exists (System.String path) [0x00043] in <81342d83acda4c5590ec19c7afdf26b9>:0
at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00028] in <23529d1919fc4cdeb9723008e6dfcc48>:0
at Mono.Tools.Driver.Main (System.String[] args) [0x00351] in <23529d1919fc4cdeb9723008e6dfcc48>:0
E: installing Assembly /usr/lib/cli/glib-sharp-2.0/glib-sharp.dll failed
E: Installation of libglib2.0-cil with /usr/share/cli-common/runtimes.d/mono failed
* Installing 5 assemblies from libgtk2.0-cil into Mono
...
...
Unhandled Exception:
System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.File.Exists (System.String path) [0x00043] in <81342d83acda4c5590ec19c7afdf26b9>:0
at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00028] in <23529d1919fc4cdeb9723008e6dfcc48>:0
at Mono.Tools.Driver.Main (System.String[] args) [0x00351] in <23529d1919fc4cdeb9723008e6dfcc48>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.File.Exists (System.String path) [0x00043] in <81342d83acda4c5590ec19c7afdf26b9>:0
at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00028] in <23529d1919fc4cdeb9723008e6dfcc48>:0
at Mono.Tools.Driver.Main (System.String[] args) [0x00351] in <23529d1919fc4cdeb9723008e6dfcc48>:0
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
dpkg: error processing package mono-gac (--configure):
subprocess installed post-installation script returned error exit status 29
dpkg: dependency problems prevent configuration of mono-runtime-common:
mono-runtime-common depends on mono-gac (= 6.0.0.313-0xamarin3+ubuntu1604b1); however:
Package mono-gac is not configured yet.
dpkg: error processing package mono-runtime-common (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mono-gac
mono-runtime-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Та же ошибка, когда ставлю
sudo apt-get install ca-certificates-mono
или
apt-get -f install
Также нельзя удалить ca-сертификаты-моно
sudo apt-get remove ca-certificates-mono
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
mono-complete : Depends: ca-certificates-mono (= 6.0.0.313-0xamarin3+ubuntu1604b1) but it is not going to be installed
mono-devel : Depends: ca-certificates-mono (= 6.0.0.313-0xamarin3+ubuntu1604b1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Позже я удаляю ca-Certific-mono командой
sudo dpkg --force-all -P ca-certificates-mono
После этого пытаюсь сделать apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
ca-certificates-mono
The following NEW packages will be installed:
ca-certificates-mono
0 upgraded, 1 newly installed, 0 to remove and 275 not upgraded.
160 not fully installed or removed.
Need to get 0 B/31.1 kB of archives.
After this operation, 85.0 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mono-gac (6.0.0.313-0xamarin3+ubuntu1604b1) ...
* Installing 1 assembly from libglade2.0-cil into Mono
Unhandled Exception:
System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.File.Exists (System.String path) [0x00043] in <81342d83acda4c5590ec19c7afdf26b9>:0
at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00028] in <23529d1919fc4cdeb9723008e6dfcc48>:0
at Mono.Tools.Driver.Main (System.String[] args) [0x00351] in <23529d1919fc4cdeb9723008e6dfcc48>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.File.Exists (System.String path) [0x00043] in <81342d83acda4c5590ec19c7afdf26b9>:0
at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00028] in <23529d1919fc4cdeb9723008e6dfcc48>:0
at Mono.Tools.Driver.Main (System.String[] args) [0x00351] in <23529d1919fc4cdeb9723008e6dfcc48>:0
E: installing Assembly /usr/lib/cli/glade-sharp-2.0/glade-sharp.dll failed
E: Installation of libglade2.0-cil with /usr/share/cli-common/runtimes.d/mono failed
* Installing 1 assembly from libglib2.0-cil into Mono
Unhandled Exception:
System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.File.Exists (System.String path) [0x00043] in <81342d83acda4c5590ec19c7afdf26b9>:0
at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00028] in <23529d1919fc4cdeb9723008e6dfcc48>:0
at Mono.Tools.Driver.Main (System.String[] args) [0x00351] in <23529d1919fc4cdeb9723008e6dfcc48>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.File.Exists (System.String path) [0x00043] in <81342d83acda4c5590ec19c7afdf26b9>:0
at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00028] in <23529d1919fc4cdeb9723008e6dfcc48>:0
at Mono.Tools.Driver.Main (System.String[] args) [0x00351] in <23529d1919fc4cdeb9723008e6dfcc48>:0
E: installing Assembly /usr/lib/cli/glib-sharp-2.0/glib-sharp.dll failed
E: Installation of libglib2.0-cil with /usr/share/cli-common/runtimes.d/mono failed
* Installing 5 assemblies from libgtk2.0-cil into Mono
Итак, теперь у меня нет ca-сертификатов-моно, и я не могу установить его из-за некоторых проблем с моно.
Хороший парень из gitter-чата проекта Mono помог мне исправить эту ошибку.
mv /etc/mono/config.dpkg-new /etc/mono/config
а потом
apt install ca-certificates-mono
решил эту ошибку.