无法在我的 Ubuntu 16:04 上打开 Pinta

无法在我的 Ubuntu 16:04 上打开 Pinta

我尝试清除该应用程序并再次安装,但没有效果。

当我apt-get clean删除 Pinta 后再次尝试时,输出如下:

The following packages were automatically installed and are no longer required:
  gnome-icon-theme libglib2.0-cil libgtk2.0-cil libmono-addins-gui0.2-cil libmono-addins0.2-cil
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up libglib2.0-cil (2.12.45-0xamarin17+ubuntu1604b1) ...
/usr/bin/gacutil: 2: exec: /usr/bin/mono: not found
W: removing assembly:  failed!
sh: 1: /usr/bin/mono: not found
Use of uninitialized value $_ in scalar chomp at /usr/share/cli-common/runtimes.d/mono line 275.
Use of uninitialized value $fullname in concatenation (.) or string at /usr/share/cli-common/runtimes.d/mono line 225.
/usr/bin/gacutil: 2: exec: /usr/bin/mono: not found
E: installing Assembly /usr/share/cli-common/policies.d/libglib2.0-cil/policy.2.8.glib-sharp.dll failed
E: Installation of policy.2.8.glib-sharp with /usr/share/cli-common/runtimes.d/mono failed
dpkg: error processing package libglib2.0-cil (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libgtk2.0-cil:
 libgtk2.0-cil depends on libglib2.0-cil (= 2.12.45-0xamarin17+ubuntu1604b1); however:
  Package libglib2.0-cil is not configured yet.

dpkg: error processing package libgtk2.0-cil (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Setting up libmono-addins0.2-cil (1.0+git20130406.adcd75b-4) ...
* Installing 18 assemblies from libmono-addins0.2-cil into Mono
sh: 1: /usr/bin/mono: not found
Use of uninitialized value $_ in scalar chomp at /usr/share/cli-common/runtimes.d/mono line 275.
Use of uninitialized value $fullname in concatenation (.) or string at /usr/share/cli-common/runtimes.d/mono line 225.
/usr/bin/gacutil: 2: exec: /usr/bin/mono: not found
E: installing Assembly /usr/lib/cli/Mono.Addins-0.2/Mono.Addins.dll failed
E: Installation of libmono-addins0.2-cil with /usr/share/cli-common/runtimes.d/mono failed
dpkg: error processing package libmono-addins0.2-cil (--configure):
 subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of libmono-addins-gui0.2-cil:
 libmono-addins-gui0.2-cil depends on libglib2.0-cil (>= 2.12.10-1ubuntu1); however:
  Package libglib2.0-cil is not configured yet.
 libmono-addins-gui0.2-cil depends on libgtk2.0-cil (>= 2.12.10-1ubuntu1); however:
  Package libgtk2.0-cil is not configured yet.
 libmono-addins-gui0.2-cil depends on libmono-addins0.2-cil (>= 1.0); however:
  Package libmono-addins0.2-cil is not configured yet.

dpkg: error processing package libmono-addins-gui0.2-cil (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 libglib2.0-cil
 libgtk2.0-cil
 libmono-addins0.2-cil
 libmono-addins-gui0.2-cil
E: Sub-process /usr/bin/dpkg returned an error code (1)

该命令sudo apt-get install --reinstall mono-runtime给了我以下内容:

Removing libgtk2.0-cil (2.12.45-0xamarin17+ubuntu1604b1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.10.atk-sharp.installcligac
dpkg: error processing package libgtk2.0-cil (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing libglib2.0-cil (2.12.45-0xamarin17+ubuntu1604b1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.8.glib-sharp.installcligac
dpkg: error processing package libglib2.0-cil (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 libgtk2.0-cil
 libglib2.0-cil
E: Sub-process /usr/bin/dpkg returned an error code (1)

以下是输出apt-cache policy libgtk2.0-cil libglib2.0-cil

libgtk2.0-cil:
  Installed: 2.12.45-0xamarin17+ubuntu1604b1
  Candidate: 2.12.45-0xamarin17+ubuntu1604b1
  Version table:
 *** 2.12.45-0xamarin17+ubuntu1604b1 500
        500 https://download.mono-project.com/repo/ubuntu vs-xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     2.12.10-6 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libglib2.0-cil:
  Installed: 2.12.45-0xamarin17+ubuntu1604b1
  Candidate: 2.12.45-0xamarin17+ubuntu1604b1
  Version table:
 *** 2.12.45-0xamarin17+ubuntu1604b1 500
        500 https://download.mono-project.com/repo/ubuntu vs-xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     2.12.10-6 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

答案1

在聊天期间我们做了以下事情。

由于 Xamarin 存储库中的软件包存在问题,我们小心地使用以下命令从系统中删除了它的软件包:

sudo mv /etc/apt/sources.list.d/mono-official-vs.list ~
sudo dpkg -P --force-all $(dpkg -l | grep xamarin | awk '{print $2}')

然后跑:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get check

然后我们删除了没有发布 xenial 软件包的 Pinta 存储库:

sudo add-apt-repository -r ppa:pinta-maintainers/pinta-stable

此后一切都正常。

相关内容