无法使用sudo apt-get install -f修复损坏的软件包


15

这是我的的结果sudo apt-get install -f。我跑了两次,得到了负面的结果。我相信出现错误

"error in Version string '0:3.6.1-dates for language English
 Translation data updates for all supported packages for:
 English"

同一条语句“版本字符串中的错误>>>>”使我三天试图下载版本12.04。也有一个关于引用文本的错误报告。总之有没有语言包的版本下载,为什么呢?我破坏了11.10版本?

另外,当尝试使用sudo apt-get install synaptic下载Synaptic时,我得到了相同的错误消息。

我再次指出初始下载问题和相同的错误消息接收。谢谢

b0b@b0b-IC780M-A:~$ sudo apt-get install -f
[sudo] password for b0b: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 298 not upgraded.
b0b@b0b-IC780M-A:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 298 not upgraded.
b0b@b0b-IC780M-A:~$ sudo apt-get upgrade install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  linux-headers-generic software-center
The following packages will be upgraded:
  accountsservice acpi-support acpid aisleriot alsa-utils
  app-install-data-partner appmenu-qt apport apport-gtk apt-transport-https
  apt-utils aptdaemon aptdaemon-data apturl apturl-common banshee
  banshee-extension-soundmenu banshee-extension-ubuntuonemusicstore baobab
  bind9-host binutils bluez-alsa bluez-cups bluez-gstreamer brasero
  brasero-cdrkit brasero-common checkbox checkbox-gtk command-not-found
  command-not-found-data compiz compiz-core compiz-gnome
  compiz-plugins-default compiz-plugins-main-default cups cups-bsd cups-client
  cups-common cups-ppdc deja-dup desktop-file-utils dnsutils empathy
  empathy-common eog evince evince-common evolution-data-server
  evolution-data-server-common file-roller firefox firefox-globalmenu
  firefox-gnome-support gbrainy gcalctool gconf2 gconf2-common gedit
  gedit-common ghostscript ghostscript-cups ghostscript-x gir1.2-atspi-2.0
  gir1.2-gconf-2.0 gir1.2-gnomebluetooth-1.0 gir1.2-gtk-3.0
  gir1.2-gtksource-3.0 gir1.2-totem-1.0 gir1.2-unity-4.0 gir1.2-webkit-3.0
  gnome-accessibility-themes gnome-bluetooth gnome-control-center
  gnome-control-center-data gnome-desktop3-data gnome-font-viewer
  gnome-games-common gnome-icon-theme gnome-mahjongg gnome-online-accounts
  gnome-orca gnome-power-manager gnome-screenshot gnome-search-tool
  gnome-session gnome-session-bin gnome-session-canberra gnome-session-common
  gnome-settings-daemon gnome-sudoku gnome-system-log gnome-system-monitor
  gnome-utils-common gnomine gstreamer0.10-gconf gstreamer0.10-plugins-good
  gstreamer0.10-pulseaudio gvfs gvfs-backends gvfs-bin gvfs-fuse gwibber
  gwibber-service gwibber-service-facebook gwibber-service-identica
  gwibber-service-twitter hpijs hplip hplip-cups hplip-data indicator-datetime
  indicator-session indicator-sound isc-dhcp-client isc-dhcp-common
  jockey-common jockey-gtk language-selector-common language-selector-gnome
  libaccountsservice0 libapt-inst1.3 libarchive1 libasound2-plugins
  libatk-adaptor libbind9-60 libbrasero-media3-1 libcamel-1.2-29
  libcanberra-gtk-module libcanberra-gtk0 libcanberra-gtk3-0
  libcanberra-gtk3-module libcanberra-pulse libcanberra0 libdecoration0
  libdns69 libebackend-1.2-1 libebook1.2-12 libecal1.2-10 libedata-book-1.2-11
  libedata-cal-1.2-13 libedataserver1.2-15 libedataserverui-3.0-1 libevince3-3
  libgconf2-4 libgnome-bluetooth8 libgnome-control-center1
  libgnome-desktop-3-2 libgoa-1.0-0 libgrip0 libgs9 libgs9-common libgtk-3-bin
  libgtksourceview-3.0-0 libgtksourceview-3.0-common libgweather-3-0
  libgweather-common libgwibber-gtk2 libgwibber2 libhpmud0 libimobiledevice2
  libisc62 libisccc60 libisccfg62 libjasper1 liblightdm-gobject-1-0 liblwres60
  libmetacity-private0 libmission-control-plugins0 libmono-zeroconf1.0-cil
  libnautilus-extension1 libnm-glib-vpn1 libnm-glib4 libnm-util2
  libnotify0.4-cil libnux-1.0-0 libnux-1.0-common libpam-gnome-keyring
  libreoffice-emailmerge libreoffice-style-human libsane-hpaio libsmbclient
  libsnmp-base libsnmp15 libsyncdaemon-1.0-1 libt1-5 libtotem0
  libubuntuone-1.0-1 libubuntuone1.0-cil libunity-2d-private0
  libunity-core-4.0-4 libunity6 libusbmuxd1 libwbclient0 libwebkitgtk-1.0-0
  libwebkitgtk-1.0-common libwebkitgtk-3.0-0 libwebkitgtk-3.0-common libxml2
  linux-generic linux-image-generic metacity metacity-common
  mobile-broadband-provider-info modemmanager mousetweaks multiarch-support
  nautilus nautilus-data nautilus-sendto-empathy network-manager nux-tools
  onboard openssl pulseaudio pulseaudio-esound-compat
  pulseaudio-module-bluetooth pulseaudio-module-gconf pulseaudio-module-x11
  pulseaudio-utils python-apport python-aptdaemon python-aptdaemon-gtk
  python-aptdaemon.gtk3widgets python-aptdaemon.gtkwidgets python-brlapi
  python-cups python-cupshelpers python-gobject-cairo python-httplib2
  python-launchpadlib python-libxml2 python-pam python-papyon
  python-pkg-resources python-problem-report python-pyatspi2
  python-software-properties python-ubuntuone-client
  python-ubuntuone-storageprotocol samba-common samba-common-bin seahorse
  shotwell simple-scan smbclient sni-qt software-properties-common
  software-properties-gtk sudo system-config-printer-common
  system-config-printer-gnome system-config-printer-udev telepathy-indicator
  telepathy-mission-control-5 thunderbird thunderbird-globalmenu
  thunderbird-gnome-support tomboy totem totem-common totem-mozilla
  totem-plugins ttf-opensymbol ubuntu-desktop ubuntu-minimal ubuntu-standard
  ubuntuone-client ubuntuone-client-gnome ubuntuone-couch unity unity-2d
  unity-2d-launcher unity-2d-panel unity-2d-places unity-2d-spread
  unity-common unity-lens-applications unity-services update-manager
  update-manager-core update-notifier update-notifier-common usbmuxd
  vim-common vim-tiny vinagre vino xorg xserver-xorg xserver-xorg-input-all
  xserver-xorg-video-all xserver-xorg-video-intel
  xserver-xorg-video-openchrome xul-ext-ubufox
296 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/159 MB of archives.
After this operation, 10.1 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: error: parsing file '/var/lib/dpkg/available' near line 4131 package 'python-zope.interface':
 error in Version string '0:3.6.1-dates for language English
 Translation data updates for all supported packages for:
 English
 .
 language-pack-en-base provides the bulk of translation data
 and is updated only seldom. This package provides frequent translation
 updates.': version string has embedded spaces
E: Sub-process /usr/bin/dpkg returned an error code (2)
b0b@b0b-IC780M-A:~$ 

Answers:


30

http://www.iasptk.com/ubuntu-fix-broken-package-best-solution

经过尝试

sudo dpkg --configure -a

sudo apt-get install -f

软件包损坏的问题仍然存在,解决方法是手动编辑dpkg状态文件。

sudo -i gedit /var/lib/dpkg/status

(您可以使用vi或nano代替gedit)

找到损坏的程序包,然后删除有关该程序包的全部信息并保存文件。


2
我知道stackexhange不鼓励像“谢谢”这样的评论,但是这一点肯定值得。非常感谢。
Kraken 2014年

2
但是那之后你怎么办?当我运行中的任何信息块sudo dpkg --configure -asudo apt-get install -f在其中删除信息块时,我总是得到损坏的软件包的相同列表/var/lib/dpkg/status
user2105469 2015年

/var/lib/dpkg/status我只需要打开文件即可发现问题。我只是将损坏的软件包的安装状态从half-configured更改为installed
Farzad YZ

我知道这很陈词滥调...但是我在包装破损中挣扎了两天。由于很多
天工

0

请尝试此过程

它通常适用于此类问题,即使到目前为止人们在这里提出的解决方案都没有。此外,如果它不起作用,它仍然会提供有用的诊断信息。因此,如果它不起作用,那么请提供终端中的所有文本。它会很长,因此您可能不想将其添加到您的问题中,而是将其粘贴到http://paste.ubuntu.com。您将看到一个URL,可以将其添加到问题中。


0

所以我从两天开始就在这个问题上苦苦挣扎,现在我已经解决了...。

首先运行此命令

sudo software-properties-gtk

然后选中所有复选框,如下所示:

执行此图片中提到的操作

之后,转到other software选项卡并取消选中所有框,如下所示:

取消选中其他选项卡中的所有框

现在单击关闭按钮->之后,将打开一个窗口并单击重新加载,希望这对您也有用。


-1

如果您有权访问终端,请输入

sudo dpkg --configure -a

请稍等片刻。


您能否添加一些命令的详细信息,以使其成为更有用的答案?
Volker Siegel 2014年

-1

我已经制作了一个脚本来修复损坏的程序包。这将在/var/log/dist-upgrade/apt.log中搜索损坏的软件包,然后找到软件包名称,然后对它们应用指定的命令。

请谨慎使用此脚本,因为有时某些损坏的软件包与系统有关,可能会引起新的问题。因此,请使用installupgrade命令而不是remove命令。

从这里获取

使用以下命令下载脚本:

wget https://gist.githubusercontent.com/EmpireWorld/8eb920165777399cfd684d8d4227a6e2/raw/17e6d4a151a6163aa45dd8302b965ed433b27741/fix-broken.sh

然后运行它:

./fix-broken.sh

您还可以设置要应用于损坏的程序包的操作,如下所示:

./fix-broken (install|upgrade|remove)

默认操作是remove

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.