无法在 Ubuntu 20.04.3 LTS 全新安装上安装 gnome-tweaks - 未满足的依赖关系问题

Cha*_*les 6 gnome dependencies gnome-shell gnome-tweaks

我一直在尝试gnome-tweaks在新的 Ubuntu 20.04.3 LTS 安装上进行安装,但没有成功。

运行sudo apt install gnome-tweaks给出以下输出:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gnome-tweaks : Depends: gnome-shell-extension-prefs but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Run Code Online (Sandbox Code Playgroud)

如果我随后尝试通过安装来解决依赖性问题,gnome-shell-extension-prefs则会收到以下错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gnome-shell-extension-prefs : Depends: gnome-shell (= 3.36.1-5ubuntu1) but 3.36.9-0ubuntu0.20.04.2 is to be installed
                               Depends: gnome-shell-common (= 3.36.1-5ubuntu1) but 3.36.9-0ubuntu0.20.04.2 is to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)

此外,运行apt-cache policy gnome-shell-extensions gnome-tweak-tool gnome-shell会给出以下输出:

gnome-shell-extensions:
  Installed: (none)
  Candidate: 3.36.1-1
  Version table:
     3.36.1-1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages
gnome-tweak-tool:
  Installed: (none)
  Candidate: 3.34.0-2ubuntu1
  Version table:
     3.34.0-2ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages
gnome-shell:
  Installed: 3.36.9-0ubuntu0.20.04.2
  Candidate: 3.36.9-0ubuntu0.20.04.2
  Version table:
 *** 3.36.9-0ubuntu0.20.04.2 500
        500 http://au.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.36.4-1ubuntu1~20.04.2 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     3.36.1-5ubuntu1 500
        500 http://au.archive.ubuntu.com/ubuntu focal/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
Run Code Online (Sandbox Code Playgroud)

根据我的基本知识,这似乎是版本冲突。我进行了广泛的搜索,但没有解决方案,似乎有很多人面临这个问题。任何解决此问题的帮助都将受到高度赞赏。

小智 4

当我尝试gnome-tweak-tool在最新的 Ubuntu 20.04.3 LTS(2021 年 11 月 19 日从 Ubuntu 官方网站下载)上安装时,遇到了同样的问题。

发生这种情况的原因是依赖项之一gnome-shell-extension-prefs需要gnome-shell (= 3.36.4-1ubuntu1~20.04.2),但3.36.9-0ubuntu0.20.04.2默认情况下已安装。

为了解决这个问题,我gnome-shell使用以下代码将其降级及其依赖项到以前的版本:

sudo apt install gnome-shell=3.36.4-1ubuntu1~20.04.2 gnome-shell-common=3.36.4-1ubuntu1~20.04.2 gnome-shell-extension-prefs=3.36.4-1ubuntu1~20.04.2
Run Code Online (Sandbox Code Playgroud)

参考


aqh*_*aqh 1

我在 Ubuntu 20.04.3 中使用相同的软件包 gnome-tweaks 时遇到了这个特定问题(我也是 Linux 的初学者)。

就我个人而言,我通过在 synaptic 包管理器中将 gnome-shell 从版本 3.36.4(默认安装在此 Ubuntu 版本中)降级到版本 3.36.1(sudo apt install synaptic因为默认情况下未安装)来解决此问题。

这可能是因为 gnome-tweaks 仅针对 gnome 3.36.1 进行了更新,而不是 Ubuntu 20.04.3 上的版本 3.36.4。