1

I used to have Tweak-Tools but it was faulty and stopped working all the time. I didn't have unity-tweak-tool. I had the gnome-tweak-tool. So I removed the whole thing using purge when facing the problem below:

atenagm@atenagm-K46CB:~$ sudo apt-get install unity-tweak-tool
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:
unity-tweak-tool : Depends: unity-webapps-common but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

but even after that, I faced the same problem. I've also tried $sudo apt-get install -f and all other solutions found here but none of them worked.

I was thinking that maybe installing other desktop environments might be the cause. I once intalled gnome3 but the gui faced problems and I deleted all the dependencies. After restarting, problem had still remained, so I went for other environments like KDE. That solved the problem, though now I am still on unity desktop and no KDE desktop environment is running on the system. Might this be the problem? If so, how can I fix it and go back to the normal unity with all the functions such as unity-tweak-tool? and if not, how can I install unity-tweak-tool?

P.S. Here is the output of installing it using gdebi:

atenagm@atenagm-K46CB:~$ sudo gdebi unity-tweak-tool_0.0.7ubuntu2_all.deb
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done
This package is uninstallable
Cannot install 'unity-webapps-common'
atenagm@atenagm-K46CB:~$ sudo gdebi unity-webapps-common_2.4.17+15.10.20150616-0ubuntu2_all.deb
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done
This package is uninstallable
Cannot install 'unity-webapps-service'

There is no error when performing $sudo apt-get update or $sudo apt-get check or any otherapt commands. The output of $sudo apt-get install -f is also as follows:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic
  linux-image-4.4.0-109-generic linux-image-extra-4.4.0-109-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Which I solved this issue also by performing an autoremove.

Update note: from chat with N0rbert we determined that main problem was
kubuntu-ppa/backports PPA. It messed Qt dependencies of unity-tweak-tool.

N0rbert
  • 99,918
Athena
  • 162

1 Answers1

1

As in other similar question I can't reproduce this problem on clean installation of Xenial without PPAs even with HWE installed.

After some trial and error I found the clue - its KDE PPA (ppa:kubuntu-ppa/backports).

Forward way (how to get there)

I describe shortly how to get there.

  1. Install Xenial and upgrade it.

    sudo apt-get update
    sudo apt-get dist-upgrade
    sudo apt-get autoremove
    
  2. Install kubuntu-desktop package

    sudo apt-get install kubuntu-desktop
    sudo dpkg --configure -a
    sudo dpkg -i --force-all /var/cache/apt/archives/kde-config-telepathy-accounts_4%3a15.12.3-0ubuntu1_amd64.deb
    sudo apt-get install -f
    
  3. Try to install unity-tweak-tool here (no KDE PPA yet)

    apt-get install --simulate unity-tweak-tool # ok
    
  4. Add KDE PPA

    sudo add-apt-repository ppa:kubuntu-ppa/backports
    sudo apt-get update
    sudo apt-get dist-upgrade
    sudo apt-get autoremove
    
    apt-get install --simulate unity-tweak-tool # fail! (see OP error message)
    

    So unity-tweak-tool does not install after upgrading KDE from their PPA.

Backward way (how to get out there)

Warning: following steps are provided without any warranty. Do not try it at home. It's very difficult and dangerous way, but who forced you to add kubuntu-ppa?

  1. Save current list of software and install Meld to make comparison later:

    dpkg -l > dpkg_-l_before.txt
    sudo apt-get install meld
    
  2. Prepare and purge PPA:

    sudo apt-get install ppa-purge
    sudo ppa-purge -i -y ppa:kubuntu-ppa/backports
    sudo apt-get install -f -y
    
  3. Find and purge obsolete packages (many of them came from KDE PPA)

    sudo apt-get autoremove
    sudo apt-get purge $(dpkg -l | grep ^rc | awk '{print $2}')
    sudo apt-get purge $(aptitude search ~o | awk '{print $2}')
    sudo apt-get autoremove
    
  4. Save list of KDE packages to file and then purge them

    dpkg -l | grep "^ii\|^ri\|^ic" | grep ~ppa | awk '{print $2}' > kde_packages.txt
    sudo apt-get purge $(cat kde_packages.txt)
    sudo apt-get autoremove
    dpkg -l | grep "^ri\|^ic" | awk '{print $2}' > kde_packages2.txt
    sudo apt-get purge $(cat kde_packages2.txt)
    sudo apt-get autoremove
    
  5. To reinstall official KUbuntu versions of KDE packages you should do the following:

    sudo aptitude install kubuntu-desktop
    

    Don't agree with removing, press n for next solution and wait for something like

    Accept this solution? [Y/n/q/?] n
    The following actions will resolve these dependencies:
    
         Downgrade the following packages:
    1)     libqt5core5a [5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 (now) -> 5.5.1+dfsg-16ubuntu7.5 (xenial-updates)]
    2)     libqt5dbus5 [5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 (now) -> 5.5.1+dfsg-16ubuntu7.5 (xenial-updates)]
    3)     libqt5network5 [5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 (now) -> 5.5.1+dfsg-16ubuntu7.5 (xenial-updates)]
    4)     libqt5qml5 [5.6.1-4ubuntu1~xenialoverlay1~4 (now) -> 5.5.1-2ubuntu6 (xenial)]
    5)     libqt5sql5 [5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 (now) -> 5.5.1+dfsg-16ubuntu7.5 (xenial-updates)]
    6)     libqt5sql5-mysql [5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 (now) -> 5.5.1+dfsg-16ubuntu7.5 (xenial-updates)]
    7)     libqt5sql5-sqlite [5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 (now) -> 5.5.1+dfsg-16ubuntu7.5 (xenial-updates)]
    8)     libqt5xmlpatterns5 [5.6.1-2build1~~xenialoverlay1~4 (now) -> 5.5.1-2build1 (xenial)]
    9)     qml-module-qtquick-xmllistmodel [5.6.1-4ubuntu1~xenialoverlay1~4 (now) -> 5.5.1-2ubuntu6 (xenial)]
    
    
    
    Accept this solution? [Y/n/q/?]y
    The following packages will be DOWNGRADED:
    ...
    
  6. After KDE reinstallation you can install unity-tweak-tool:

    sudo apt-get install unity-tweak-tool
    
  7. Save new list of software and compare it with previous one with Meld

    dpkg -l > dpkg_-l_after.txt
    meld dpkg_-l_before.txt dpkg_-l_after.txt
    

    Then you can manually install missed packages.

Conclusion

If unsure - never install such big projects as KDE from PPAs. It's very difficult to solve dependency problems in such situations. Version from official repository was tested for dependencies, version from PPA may break whole system.

N0rbert
  • 99,918