我该如何在 Xubuntu 笔记本电脑上清除并重新安装 X2Go。它完全失败了

我该如何在 Xubuntu 笔记本电脑上清除并重新安装 X2Go。它完全失败了

我在 Xubuntu 笔记本电脑上成功使用了 X2Go,但在运行适当升级它全都搞砸了,我既不能使用它,也不能清除它。

me@laptop:~$ sudo -A apt purge x2goserver
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libx2go-log-perl : Depends: x2goserver-common (>= 4.1.0.4-0~1975~ubuntu20.04.1) but 4.1.0.3-5 is to be installed
 libx2go-server-db-perl : Depends: x2goserver-common (>= 4.1.0.4-0~1975~ubuntu20.04.1) but 4.1.0.3-5 is to be installed
 libx2go-server-perl : Depends: libx2go-log-perl (< 4.1.0.3-5.1~) but 4.1.0.4-0~1975~ubuntu20.04.1 is to be installed
                       Depends: libx2go-server-db-perl (< 4.1.0.3-5.1~) but 4.1.0.4-0~1975~ubuntu20.04.1 is to be installed
 x2goserver-extensions : Depends: x2goserver (< 4.1.0.3-5.1~) but it is not going to be installed
                         Depends: x2goserver (>= 4.1.0.3-5) but it is not going to be installed
 x2goserver-fmbindings : Depends: x2goserver (< 4.1.0.3-5.1~) but it is not going to be installed
                         Depends: x2goserver (>= 4.1.0.3-5) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
me@laptop:~$

按照建议做:

me@laptop:~$ sudo -A apt --fix-broken 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:
  libcapture-tiny-perl libconfig-simple-perl libdbd-pg-perl libdbd-sqlite3-perl libdbi-perl libfile-which-perl libnx-x11-6 libpq5 libswitch-perl libx2go-log-perl libx2go-server-db-perl libx2go-server-perl libxcomp3 libxcompshad3 linux-headers-5.4.0-147 linux-headers-5.4.0-147-generic
  linux-image-5.4.0-147-generic linux-modules-5.4.0-147-generic linux-modules-extra-5.4.0-147-generic nx-x11-common nxagent pwgen x2goserver-common x2goserver-x2goagent
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libx2go-server-perl x2goserver-common
The following packages will be REMOVED:
  libx2go-utils-perl x2goserver-extensions x2goserver-fmbindings
The following packages will be upgraded:
  libx2go-server-perl x2goserver-common
2 upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0 B/132 kB of archives.
After this operation, 3,072 B disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 261284 files and directories currently installed.)
Preparing to unpack .../libx2go-server-perl_4.1.0.4-0~1975~ubuntu20.04.1_all.deb ...
Unpacking libx2go-server-perl (4.1.0.4-0~1975~ubuntu20.04.1) over (4.1.0.3-5) ...
dpkg: error processing archive /var/cache/apt/archives/libx2go-server-perl_4.1.0.4-0~1975~ubuntu20.04.1_all.deb (--unpack):
 trying to overwrite '/usr/share/man/man3/X2Go::Utils.3pm.gz', which is also in package libx2go-utils-perl 4.1.0.3-5
Errors were encountered while processing:
 /var/cache/apt/archives/libx2go-server-perl_4.1.0.4-0~1975~ubuntu20.04.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
me@laptop:~$ 

我似乎在使用aptnow 时一直遇到相同的错误。所以我无法使用 X2Go,也无法使用apt

me@laptop:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libx2go-log-perl : Depends: x2goserver-common (>= 4.1.0.4-0~1975~ubuntu20.04.1) but 4.1.0.3-5 is installed
 libx2go-server-db-perl : Depends: x2goserver-common (>= 4.1.0.4-0~1975~ubuntu20.04.1) but 4.1.0.3-5 is installed
 libx2go-server-perl : Depends: libx2go-log-perl (< 4.1.0.3-5.1~) but 4.1.0.4-0~1975~ubuntu20.04.1 is installed
                       Depends: libx2go-server-db-perl (< 4.1.0.3-5.1~) but 4.1.0.4-0~1975~ubuntu20.04.1 is installed
 x2goserver-extensions : Depends: x2goserver (< 4.1.0.3-5.1~) but it is not installed
                         Depends: x2goserver (>= 4.1.0.3-5) but it is not installed
 x2goserver-fmbindings : Depends: x2goserver (< 4.1.0.3-5.1~) but it is not installed
                         Depends: x2goserver (>= 4.1.0.3-5) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
me@laptop:~$ 

我怎样才能解决这个问题?

系统:

me@laptop:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:    20.04
Codename:   focal

答案1

我也对此感到惊讶。我能够修复软件包,但我完全从我的服务器上删除了 X2Go。下面是我在终端中执行的修复由 X2Go 引起的损坏软件包的过程。

  1. sudo dpkg --force-all --remove x2goserver
  2. sudo dpkg --force-all --purge x2goserver
  3. 删除 PPA:sudo add-apt-repository --remove ppa:x2go/stable
  4. sudo apt-get --fix-broken 安装

现在你可以执行 sudo apt update && upgrade

答案2

我已经能够修复损坏的软件包更新和升级问题,但我不得不从我的服务器上彻底删除 X2Go。下面是我在终端中执行的修复 X2Go 导致的损坏软件包的过程。

  1. sudo dpkg --force-all --remove x2goserver
  2. sudo dpkg --force-all --purge x2goserver
  3. 删除 PPA:sudo add-apt-repository --remove ppa:x2go/stable
  4. sudo apt-get --fix-broken 安装

现在你可以执行 sudo apt update && upgrade

相关内容