Score:1

Can't install gnome-tweaks on Ubuntu 20.04.3 LTS fresh install - Unmet dependency issue

us flag

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.

nobody avatar
gh flag
`software-properties-gtk` and choose download from main server in tab ubuntu software. refresh `sudo apt update` and try again please.
N0rbert avatar
zw flag
Does this answer your question? [How do I restore the default repositories?](https://askubuntu.com/questions/124017/how-do-i-restore-the-default-repositories)
karel avatar
sa flag
Does this answer your question? [Unable to correct problems, you have held broken packages](https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages)
Score:1
cn flag

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

ru flag
Thank you. U nailed it!
Score:0
ru flag
aqh

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.

elmclose avatar
cn flag
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.
aqh avatar
ru flag
aqh
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
Zanna avatar
kr flag
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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.