![前进的方向(如何到达)](https://linux22.com/image/1203949/%E5%89%8D%E8%BF%9B%E7%9A%84%E6%96%B9%E5%90%91%EF%BC%88%E5%A6%82%E4%BD%95%E5%88%B0%E8%BE%BE%EF%BC%89.png)
我以前有Tweak-Tools
,但它有故障,总是停止工作。我没有unity-tweak-tool
。我有gnome-tweak-tool
。所以当遇到以下问题时,我使用清除功能删除了整个东西:
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.
但即便如此,我还是遇到了同样的问题。我也尝试过,$sudo apt-get install -f
但找不到其他解决方案这里但都没有起作用。
我在想也许安装其他桌面环境可能是原因。我曾经安装过gnome3
,但 GUI 遇到了问题,于是我删除了所有依赖项。重新启动后,问题仍然存在,所以我选择了其他环境,比如 KDE。这解决了问题,但现在我仍然在 Unity 桌面上,系统上没有运行 KDE 桌面环境。这可能是问题所在吗?如果是这样,我该如何修复它并恢复到具有所有功能的正常 Unity,例如unity-tweak-tool
?如果不是,我该如何安装unity-tweak-tool
?
PS 这里是使用以下命令安装的输出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'
$sudo apt-get update
执行或$sudo apt-get check
或其他任何命令都没有错误apt
。 的输出$sudo apt-get install -f
也如下:
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.
我也通过执行自动删除解决了这个问题。
更新说明:通过与 N0rbert 的聊天,我们确定主要问题是
kubuntu-ppa/backports
PPA。它扰乱了 Qt 依赖关系unity-tweak-tool
。
答案1
与其他类似问题我无法在没有 PPA 的情况下在全新安装 Xenial 时重现此问题,即使使用氢能资源已安装。
经过反复试验后,我找到了线索 —— 它的 KDE PPA(ppa:kubuntu-ppa/backports
)。
前进的方向(如何到达)
我简要描述了如何到达那里。
安装 Xenial 并升级它。
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get autoremove
安装 kubuntu-desktop 包
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
尝试在此处安装
unity-tweak-tool
(尚无 KDE PPA)apt-get install --simulate unity-tweak-tool # ok
添加 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)
因此
unity-tweak-tool
从其 PPA 升级 KDE 后无法安装。
后路(如何出去)
警告:以下步骤不提供任何保证。请勿在家中尝试。这是非常困难和危险的方法,但是谁强迫你添加 kubuntu-ppa 的呢?
保存当前软件列表并安装 Meld 以便稍后进行比较:
dpkg -l > dpkg_-l_before.txt sudo apt-get install meld
准备并清除 PPA:
sudo apt-get install ppa-purge sudo ppa-purge -i -y ppa:kubuntu-ppa/backports sudo apt-get install -f -y
查找并清除过时的软件包(其中许多来自 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
将 KDE 软件包列表保存到文件然后清除它们
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
要重新安装 KDE 软件包的官方 KUbuntu 版本,您应该执行以下操作:
sudo aptitude install kubuntu-desktop
不同意删除,请n按下一步解决方案并等待类似
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: ...
重新安装 KDE 后,您可以安装
unity-tweak-tool
:sudo apt-get install unity-tweak-tool
保存新的软件列表并使用 Meld 将其与之前的列表进行比较
dpkg -l > dpkg_-l_after.txt meld dpkg_-l_before.txt dpkg_-l_after.txt
然后您可以手动安装错过的软件包。