我在尝试修复桌面随机冻结的问题时意外删除了 gnome-software(我愚蠢地听从了某个论坛上的建议)。这是 iterm.log 的相关部分:
(Reading database ... 243899 files and directories currently installed.)
Removing ubuntu-software (3.20.1+git20160617.1.0440874.ubuntu-xenial- 0ubuntu1~16.04.1) ...
Removing gnome-software (3.20.1+git20160617.1.0440874.ubuntu-xenial-0ubuntu1~16.04.1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.48.1-1~ubuntu16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160701-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...```
我以为我应该能够重新安装已卸载的内容但我似乎无法做到这一点(至少不能通过apt-get
)。
sudo apt-get install ubuntu-software
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ubuntu-software is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ubuntu-software' has no installation candidate
gnome-software 也有类似的消息
$ sudo apt-get install gnome-software
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gnome-software is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gnome-software' has no installation candidate
我认为这可能是由于软件和更新中的源所致,但我已经启用了所有我认为可能有软件包的源。我已启用以下源:
输出apt-get update
:
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]
Hit:4 http://dl.google.com/linux/chrome/deb stable Release
Hit:6 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial InRelease
Hit:7 http://archive.canonical.com/ubuntu xenial InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Hit:10 http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial InRelease
Ign:11 http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04 InRelease
Hit:12 http://ppa.launchpad.net/ubuntu-desktop/gnome-software/ubuntu xenial InRelease
Hit:13 http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04 Release
Hit:14 http://ppa.launchpad.net/wine/wine-builds/ubuntu xenial InRelease
Hit:16 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Fetched 190 kB in 1s (160 kB/s)
Reading package lists... Done
W: Target Packages (Packages) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:2
W: Target Translations (en_US) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:2
W: Target Translations (en) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:2
W: Target Packages (Packages) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:3
W: Target Translations (en_US) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:3
W: Target Translations (en) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:3
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:2 and /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:3
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:2 and /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:4
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:2 and /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:5
W: Target Packages (Packages) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:2
W: Target Translations (en_US) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:2
W: Target Translations (en) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:2
W: Target Packages (Packages) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:3
W: Target Translations (en_US) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:3
W: Target Translations (en) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:3
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:2 and /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:3
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:2 and /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:4
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:2 and /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-gnome-software-xenial.list:5
输出apt-cache policy gnome-software
:
gnome-software:
Installed: (none)
Candidate: (none)
Version table:
3.20.1+git20160617.1.0440874.ubuntu-xenial-0ubuntu1~16.04.1 0
100 /var/lib/dpkg/status
软件和更新应用程序的屏幕截图:
答案1
对于可能遇到此问题的人,请注意:
- 删除了所有内容
/var/lib/apt/lists
- 遵循概述的指示这里。
- 跑了
apt-get update && apt-get install gnome-software