我最近在桌面上安装了 16.04,我做的第一件事就是安装 Unity Tweak Tool(通过 Ubuntu 软件应用商店)。一段时间内它运行良好。后来,在进行了一些自定义操作后(安装了 Cairo-Dock,但性能很差,所以我删除了它并用 Docky 替换了它),我最终注意到 Dock 上的 Unity Tweak Tool 图标是一个带有问号的灰色框,就像它被删除了一样。我检查了终端,看看是否可以通过命令行启动它,但现在操作系统说它没有安装。
我一直尝试重新安装 Unity Tweak Tool,但没有成功:
如果我尝试单击 Ubuntu 软件中的安装按钮来安装该工具,它会在一瞬间显示正在下载,但随后会返回安装按钮(但是,unity 启动器会显示图标并显示“等待安装”)。此外,它甚至不会询问我的密码。我使用 Ubuntu 软件安装其他应用程序没有任何问题。
如果我尝试通过 apt-get 安装 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.
但是,如果我运行,dpkg --get-selections | grep hold
则没有任何输出,表明没有保留的软件包。我试了sudo apt-get clean
又试,但无济于事。然后我尝试使用 aptitude,它也给出了一些奇怪的结果。它首先说要安装 46 个使用 44.4 MB 的软件包,然后它给了我一长串未满足的依赖项以及满足这些依赖项的解决方案。我输入“Y”表示同意,并得到了以下响应:
No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
需要获取 0 B 的档案。解压后将使用 0 B。
我也尝试过 synaptic 包管理器。当我标记 unity-tweak-tool 进行安装时,它 a) 将其标记为损坏的包,并且 b) 显示长的需要删除的软件包列表(包括很多 Unity/Ubuntu 的东西,甚至synaptic
它自己,这没有意义)。
有没有什么方法可以解决这个问题而不需要全新安装 Ubuntu?
此外,我的sources.list
文件如下所示:
#deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
答案1
以下解决方案对我有用:
sudo aptitude install unity-tweak-tool
这将修复损坏的软件包和未解决的依赖关系。祝你好运!
答案2
清除统一调整工具和重新安装实际上对我来说有效。
sudo apt-get purge unity-tweak-tool
sudo apt-get autoremove && sudo apt-get autoclean
sudo apt-get install unity-tweak-tool
答案3
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.
自从我不能安装unity 调整工具...Ubuntu 调整是我能找到的最佳选择……