Problem with ca-certificates-mono on Linux Ubuntu

Hello, I know that this is not a problem of Manager directly, but anyway, maybe someone faced with my issues…

My machine is Ubuntu 16.04. I tried to upgrade mono for the latest version.

I’ve got dependency error

Depends: ca-certificates-mono (= 6.0.0.313-0xamarin3+ubuntu1604b1) but 4.8.1.0-0xamarin1 is to be installed

After this I removed old version of ca-certificates-mono
sudo dpkg --force-all -P ca-certificates-mono and made
sudo apt-get install -f command.

Now I’ve got another problem


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

SOME SIMILAR ERROR HERE

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)

Can someone give me an advice ?

Have you tried from the mono guide itself?.

https://www.mono-project.com/download/stable/

Yes. Because I’ve done this Download - Stable | Mono I faced with problem.

This is my opinion. Not really expert. Since I’m still practicing using debian. You may need to remove the mono library completely. Then follow the steps from mono website with the right repository.

I’m looking the guide how to remove old repo. Couldn’t get the right one.

Edit: found it.

Change to the correct repo or just remove the old one. Then follow the mono guide for re-installation.

Doesn’t help :frowning:

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

apt-get -f install made same errors which I wrote above.

I am not sure, but I think the problem is on this stage:

Setting up mono-gac (6.0.0.313-0xamarin3+ubuntu1604b1) ...
* Installing 1 assembly from libglade2.0-cil into Mono

Apt-get -f install as far of what I understand it, tries to correcting or tries to complete the uncomplete previous installation.

My advice would be complete removable of mono library. And delete previous repository list for mono. Then follow the mono guide to install.

Do install mono-complete package.

I cannot remove mono library because of dependency problem. Linux suggest me to execute

Try 'apt-get -f install' with no packages (or specify a solution).

But this doesn’t help.

This was done before I faced with my problem. First I deleted old mono repository, then I executed
instruction from Download - Stable | Mono anf faced with errors.

You mean you have application that rely on mono currently? Does it say which package that relies on mono?

No. I have Manager with old Mono version. I decided to update Mono to the latest based on official instruction. Then I faced with a problem.

Ahahah. No wonder. To remove mono you have to remove manager that relies on that older mono library. Which i recommend backup the business files. Before attempting to update, or remove mono.

Before doing the following reference of removing mono-gac

Backup the manager business file somewhere save like your cloud storage or pendrive. Just in case.

Thanks for the link, I saw it before I wrote here. It didn’t help. :frowning:

I already mention about removing mono, you need to remove/uninstall manager. Which you need to backup first.

Don’t ever attempt to mess with depedency without making a backup first. You gonna regret it for sure if something bad happen to your operating system.

Why I need to remove/uninstall manager ? It’s not a problem with Manager. It is problem with Mono.

The keyword here is without mono, manager breaks. It relies on mono library. Anything happens to mono. You need to remove the application that rides on that library. No mono, no manager. That is how linux works. Its a safety mechanism.

Good guy from Mono project gitter chat help me to fix this error.

mv /etc/mono/config.dpkg-new /etc/mono/config

and then

apt install ca-certificates-mono

solved this error.

1 Like

None of this had anything to do with Manager. I have closed and unlisted the topic.