Unable to fix broken packages with sudo apt-get install -f

Here's my result, of sudo apt-get install -f. i have Ran it twice and got negative result. I believe there is an error at

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

This same statement "error in Version string>>>>, caused me three days of attempting to download version 12.04. There is a bug report concerning the quoted text as well. Is there anyway to download the version without the language packs, why would I corrupt version 11.10?

Also, when attempting to download Synaptic using sudo apt-get install synaptic, I get the same error message.

Again I point out the initial download problems and the same error message receipt. Thanks

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:~$ 

6 Answers

After trying

sudo dpkg --configure -a

and

sudo apt-get install -f

the problem of a broken package still exist the solution is to edit the dpkg status file manually.

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

(you can use vi or nano instead of gedit)

Locate the corrupt package, and remove the whole block of information about it and save the file.

4

Try this procedure.

It usually works for this sort of problem, even when the solutions people have proposed here so far don't. Furthermore, if it doesn't work, it still does give useful diagnostic information. So if it doesn't work, then please provide all the text from the Terminal. It will be rather long, so instead of putting it into your question, you may want to paste it at . You'll get a URL to see it, which you can add to your question.

0

So I was struggling with this probbem from 2 days and now I have solved it....

First run this command

sudo software-properties-gtk

then check all box like this:

do this what mentioned in this pic

after that go to other software tab and untick all boxes like this:

untick all boxes in other tab

and now click close button -> after that a window will be opened and click reload, I hope this will work you also....

I was facing the issue while installing build-essentials after upgrading from 14.04 LTS to 16.04 LTS. I have written the detailed solution here. But for the sake of convenience I will reproduce the key points here.

Remove all dependent libraries (autoremove) and install all missing libraries using sudo apt-get -f install (-f means --fix-missing)

sudo apt-get autoremove
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade 

Install ubuntu toolchain from PPA

sudo add-apt-repository ppa:ubuntu-toolchain-r/test

Install aptitude.

sudo apt install aptitude

Recursively try installing the broken libraries until you solve the conflict by upgrading or fixing a specific library. In my case I had to fix libstdc++6

$ sudo aptitude -f install build-essential
The following NEW packages will be installed: build-essential cpp{a} cpp-5{a} g++{a} g++-5{a} gcc{a} gcc-5{a} libasan2{a} libcc1-0{ab} libcilkrts5{a} libgcc-5-dev{a} liblsan0{ab} libmpx0{a} libstdc++-5-dev{a}
The following packages will be upgraded: gcc-5-base libstdc++6{b}
2 packages upgraded, 14 newly installed, 0 to remove and 5 not upgraded.
Need to get 29.6 MB of archives. After unpacking 100 MB will be used.
The following packages have unmet dependencies: liblsan0 : Depends: gcc-9-base (= 9.3.0-10ubuntu2~16.04) but 9.3.0-11ubuntu0~14.04 is installed. libcc1-0 : Depends: gcc-9-base (= 9.3.0-10ubuntu2~16.04) but 9.3.0-11ubuntu0~14.04 is installed. libstdc++6 : Depends: gcc-9-base (= 9.3.0-10ubuntu2~16.04) but 9.3.0-11ubuntu0~14.04 is installed.

As build-essential needs gcc-5.

$ sudo apt-get -f install gcc-5
The following packages have unmet dependencies: gcc-5 : Depends: cpp-5 (= 5.5.0-12ubuntu1~16.04) but it is not going to be installed Depends: gcc-5-base (= 5.5.0-12ubuntu1~16.04) but 5.4.0-6ubuntu1~16.04.12 is to be installed Depends: libcc1-0 (>= 5.5.0-12ubuntu1~16.04) but it is not going to be installed Depends: libgcc-5-dev (= 5.5.0-12ubuntu1~16.04) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

But gcc-5 in turn depends on cpp-5

$ sudo apt-get -f install cpp-5
The following packages have unmet dependencies: cpp-5 : Depends: gcc-5-base (= 5.5.0-12ubuntu1~16.04) but 5.4.0-6ubuntu1~16.04.12 is to be installed

cpp-5 depends on gcc-5-base. Here you can see there is a specific conflict. Aptitide gives multiple choices to solve the conflict. In my case upgrading the libstdc++6 solvd the problem.

$sudo aptitude -f install gcc-5-base
The following packages will be REMOVED: gcc-5-base{u}
0 packages upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
Need to get 0 B of archives. After unpacking 67.6 kB will be freed.
The following packages have unmet dependencies: libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.12) but it is not going to be installed.
open: 115; closed: 488; defer: 35; conflict: 58 .The following actions will resolve these dependencies: Keep the following packages at their current version:
1) gcc-5-base [5.4.0-6ubuntu1~16.04.12 (now, xenial-security, xenial-updates)]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies: Upgrade the following packages:
1) libstdc++6 [5.4.0-6ubuntu1~16.04.12 (now, xenial-security, xenial-updates) -> 9.3.0-10ubuntu2~16.0

Finally, now the conlict is resolved try installing build-essentials again.

$ sudo aptitude -f install build-essential

Good Luck!

If you have access to a terminal type in

sudo dpkg --configure -a

Wait a while everything should be taken care of.

1

I have made a script for fixing broken packages. This searches for the broken packages in the /var/log/dist-upgrade/apt.log and then finds the package names then applies the specified command on them.

Take care about using this script, because sometimes some broken packages are system related and might make a new problem. so use install or upgrade command instead of remove command.

Get it from here

Download the script using the below command:

wget 

Then run it:

./fix-broken.sh

Also you can set the action you want to apply to broken packages like this:

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

The default action is remove.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like