如何恢复基本 ubuntu 包以摆脱未满足的依赖关系循环?

如何恢复基本 ubuntu 包以摆脱未满足的依赖关系循环?

我意外地毁掉了我的 Ubuntu 16.04。我刚刚设法找回了我的桌面,但缺少许多必需的软件包,例如 gedit、latex 和用于在 Firefox 中显示图形的软件包。

我无法重新安装这些,因为我陷入了未满足依赖关系的循环中。有没有办法恢复核心 ubuntu 16.04 软件包?

我杀死的并且没有恢复的所有东西的列表是

a11y-profile-manager-indicator
account-plugin-facebook
account-plugin-flickr
at
bamfdaemon
baobab
brasero
ca-certificates-java
ca-certificates-mono
caribou
chrome-gnome-shell
cm-super
cm-super-minimal
cmake-data
compiz-gnome
context
context-modules
deja-dup
dleyna-server
feynmf
fonts-crosextra-caladea
fonts-crosextra-carlito
fonts-junicode
fonts-linuxlibertine
freepats
gdm3
gimp
gimp-data
gnome-bluetooth
gnome-control-center
gnome-control-center-data
gnome-disk-utility
gnome-orca
gnome-settings-daemon
gnome-software
gnome-system-log
gnome-user-share
iio-sensor-proxy
indicator-appmenu
indicator-bluetooth
indicator-printers
indicator-stickynotes
java-common
libcddb2
libdca0:amd64
libdirectfb-1.2-9:amd64
libdleyna-core-1.0-3:amd64
libfaad2:amd64
libflac++6v5:amd64
libfreexl1:amd64
libgflags2v5
libgl2ps0
libglib2.0-cil
libgoogle-glog0v5
libgtk2.0-cil
libgtkspell3-3-0:amd64
libhdf4-0-alt
libid3tag0
libmpcdec6:amd64
libofa0:amd64
libogdi3.2
libopenal-data
libopenal1:amd64
libplot2c2
libportmidi0
libportsmf0v5:amd64
libqtassistantclient4:amd64
libreoffice-avmedia-backend-gstreamer
libreoffice-java-common
libresid-builder0c2a
libsbsms10:amd64
libsdl-mixer1.2:amd64
libsdl-ttf2.0-0:amd64
libsidplay2v5
libsmpeg0:amd64
libspandsp2:amd64
libsratom-0-0:amd64
libsuperlu4:amd64
libunity-core-6.0-9:amd64
libunity-misc4
libvamp-hostsdk3v5:amd64
libvcdinfo0
libvlc5
libvlccore8
libvo-aacenc0:amd64
libvo-amrwbenc0:amd64
libwildmidi-config
libwildmidi1:amd64
libxml-commons-resolver1.1-java
libxml-sax-perl
mayavi2
mono-runtime-common
mysql-common
network-manager-gnome
odbcinst
onboard
openjdk-8-jre-headless:amd64
policykit-1-gnome
python-matplotlib-data
python-twisted
python-twisted-core
r-base-core
realmd
shotwell
smartmontools
snapd-login-service
system-config-printer-gnome
telepathy-mission-control-5
tex4ht
tex4ht-common
texinfo
texlive-bibtex-extra
texlive-fonts-extra
texlive-fonts-extra-doc
texlive-formats-extra
texlive-games
texlive-generic-extra
texlive-htmlxml
texlive-humanities
texlive-humanities-doc
texlive-lang-african
texlive-lang-arabic
texlive-lang-cyrillic
texlive-lang-czechslovak
texlive-lang-english
texlive-lang-european
texlive-lang-french
texlive-lang-german
texlive-lang-greek
texlive-lang-indic
texlive-lang-italian
texlive-lang-polish
texlive-lang-portuguese
texlive-lang-spanish
texlive-math-extra
texlive-metapost
texlive-metapost-doc
texlive-music
texlive-omega
texlive-plain-extra
texlive-publishers
texlive-publishers-doc
texlive-science
texlive-science-doc
thunderbird
transmission-gtk
unity
unity-control-center
unity-webapps-common
unity-webapps-service
update-notifier
usb-creator-gtk
velocity
vino
xdg-user-dirs-gtk
xdiagnose

尝试安装其中任何一个包似乎都会失败,因为无法找到满足其依赖关系的某种神奇顺序。

kpierce@dw7mhal3:~$ sudo apt-get install unity
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 resolve the situation:

The following packages have unmet dependencies:
 unity : Depends: libnux-4.0-0 but it is not going to be installed
         Depends: libunity-core-6.0-9 (= 7.4.0+16.04.20160415-0ubuntu1) but it is not going to be installed
         Depends: compiz but it is not going to be installed
         Depends: compiz-core-abiversion-20151010
         Depends: libnux-abiversion-20140307.0
         Depends: bamfdaemon
         Recommends: unity-control-center but it is not going to be installed
         Recommends: unity-scope-manpages but it is not going to be installed
         Recommends: unity-scope-calculator but it is not going to be installed
         Recommends: unity-scope-devhelp but it is not going to be installed
         Recommends: unity-scope-firefoxbookmarks but it is not going to be installed
         Recommends: unity-scope-yelp but it is not going to be installed
         Recommends: unity-scope-virtualbox but it is not going to be installed
         Recommends: unity-scope-openclipart but it is not going to be installed
         Recommends: unity-scope-tomboy but it is not going to be installed
         Recommends: unity-scope-colourlovers but it is not going to be installed
         Recommends: unity-lens-photos but it is not going to be installed
         Recommends: unity-scope-chromiumbookmarks but it is not going to be installed
         Recommends: unity-scope-zotero but it is not going to be installed
         Recommends: unity-scope-texdoc but it is not going to be installed
         Recommends: gnome-disk-utility but it is not going to be installed
         Recommends: indicator-appmenu (>= 15.02.0) but it is not going to be installed
         Recommends: indicator-bluetooth but it is not going to be installed
         Recommends: indicator-printers but it is not going to be installed
         Recommends: session-shortcuts but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

答案1

尝试使用sudo aptitude install firefox并继续选择要保留或删除的包,直到它满足依赖性。您不必选择它给您的第一个选择。

答案2

请先检查您的存储库设置 - 请参阅此问答

然后继续:

  1. 更新软件包列表

    sudo apt-get update
    
  2. 重新安装主系统包:

    sudo apt-get install --reinstall ubuntu-minimal
    
  3. 重新安装 Unity 桌面。

    sudo apt-get install --reinstall ubuntu-desktop
    

发生错误时使用

sudo apt-get install -f
sudo dpkg --configure -a

最后

sudo apt-get dist-upgrade

从 16.04 LTS 存储库获取最新的依赖项。


如果您有任何错误 - 请通过编辑将其添加到问题中。

答案3

老实说,备份您的个人文件并进行全新安装会比尝试修复损坏的安装并希望您不会错过任何东西更快。

相关内容