6

I've been trying to install gnome-tweaks on a fresh Ubuntu 20.04.3 LTS install but to no avail.

Running sudo apt install gnome-tweaks gives the following output:

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.

If I then try to resolve the dependency issue by installing gnome-shell-extension-prefs I get the following error:

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.

Furthermore, Running apt-cache policy gnome-shell-extensions gnome-tweak-tool gnome-shell gives the following output:

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

With my basic knowledge, it seems like a versioning conflict. I've searched far and wide but no solution and seems there are a significant number of people facing this issue. Any help to resolve this will be highly appreciated.

Charles
  • 61

2 Answers2

4

I met the same problem when I tried to install gnome-tweak-tool on the lates Ubuntu 20.04.3 LTS (downloaded from Ubuntu official site on 19th November 2021).

The reason this happens is that one of the dependencies gnome-shell-extension-prefs requires gnome-shell (= 3.36.4-1ubuntu1~20.04.2) but 3.36.9-0ubuntu0.20.04.2 was installed by default.

To solve it I downgraded gnome-shell and its dependencies to the previous version with the following code:

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

References

Zanna
  • 70,465
yoursbh
  • 41
  • 4
1

I've had this specific problem (I am also a beginner in Linux) with the same package, gnome-tweaks, in Ubuntu 20.04.3.

Personally, I've worked around this issue by downgrading gnome-shell from version 3.36.4 (installed by default in this Ubuntu version) to version 3.36.1 in the synaptic package manager (sudo apt install synaptic as it's not installed by default).

This is possibly because gnome-tweaks has only been updated for gnome 3.36.1 instead of version 3.36.4 found on Ubuntu 20.04.3.

aqh
  • 31
  • 4
  • I don't think downgrading your shell is the answer. If you have unmet dependency problem it may keep giving you problem when installing other programs. So you need to fix it. See the post #223237 in Askubuntu and try some of the answers. –  Oct 20 '21 at 09:11
  • personally I'm yet to have a dependency issue with my workaround which is to force the version of gnome-shell-common as I've ran apt update afterwards successfully but I'd love to learn more as I'm new here,how do you view a specific post numbers.thanks – aqh Oct 20 '21 at 09:53
  • You can put the number into the search box at the top of the page - seems elmclose was referring to https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages . Downgrading is generally a last resort, but if synaptic suggested it it's probably okay, and you should be able to use synaptic to resolve any future issues that might arise from it, so I think this is a reasonable suggestion – Zanna Oct 20 '21 at 17:17