Fix The error message was :'Error:BrokenCount>0 in Ubuntu Linux

Post Reply
User avatar
Eli
Senior Expert Member
Reactions: 185
Posts: 5454
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#1

The error message

An error occurred, please run Package Manager from the right-click menu or apt-get in a teminal to see what is wrong. The error message was :'Error:BrokenCount>0'. This usually means that your installed packages have unment dependences

is usually encountered by Ubuntu Linux users, mostly when upgrading systems packages or the whole system to higher versions. As the message suggests, there might be bad repositories. The obvious solution is either to remove the bad repositories or all except the default ones. To do so run

Code: Select all

gksu software-properties-gtk

This will open the software sources dialog

Image

Click on "Other Software" and remove all third party repositories, and thereafter, run the commands below

Code: Select all

sudo apt-get update && sudo apt-get install -f && sudo apt-get update

or

Code: Select all

sudo apt-get update && sudo apt-get -f install  && sudo apt-get update

See if the problem has been solved.

If the the method above does not work, try the one below.

Update package repositories:

Code: Select all

sudo apt-get update

Clean if any broken ones, the downloaded packages:

Code: Select all

sudo apt-get clean

The system may suggest to remove the broken packages or unneeded or some packages that are needed but their dependencies or such have been removed leaving them orphan. In this case, execute

Code: Select all

sudo apt-get autoremove

Please use the command above with care.

Reconfigure packages:

Code: Select all

sudo dpkg --configure -a

Fix broken packages:

Code: Select all

sudo apt-get install -f

If the solutions above do not work, try this one: Remove the sources list and update packages again:

Code: Select all

sudo rm -vf /var/lib/apt/lists/*

-v, --verbose explain what is being done
-f, --force ignore nonexistent files and arguments, never prompt


Update the packages:

Code: Select all

sudo apt-get update

There is no guarantee the above solutions will work, if that is the case try to run the command:

Code: Select all

sudo apt-get install –fix-broken

Problem not solved? Last but not least, try to update and upgrade packages, problematic packages may be removed and replaced with their upgrades:

Code: Select all

sudo apt-get update && sudo apt-get upgrade

During all these trials, you may solve one problem and cause another one. The most likely problems are addressed below.

Unity and/or gnome desktop disappearing

In this case your system menu/gnome desktop may disappear, you can neither access/open the Terminal by Ctrl + Alt + T nor by any other graphical means.

Fix this by opening the tty terminal as follows:

Code: Select all

Ctrl + Alt + F1 (Try F1 - F6)

Enter your username and password, and then

Code: Select all

sudo apt-get purge unity #Remove old unity
sudo apt-get install unity #Install unity

After the commands above, you may see the Unity Dash and use Terminal, but the color of the Terminal may change from purple to black, copying into Terminal may not be possible and you may not be able to open the system menu and/or perform any GUI task. To alleviate all these problems, execute:

Code: Select all

sudo apt-get install ubuntu-desktop

Finally you may consider to upgrade your system to the newest stable version, for example, from Ubuntu Linux 14.04 to 16.04.


Another possible error, especially, after upgrading is:

W: Target Packages (universe/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:52
W: Target Packages (universe/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:52
W: Target Packages (universe/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:52
W: Target Translations (universe/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:52
W: Target Translations (universe/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:52
W: Target Translations (universe/i18n/Translation-en_ZA) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:52
W: Target DEP-11 (universe/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:52
W: Target DEP-11-icons (universe/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:52


You can get rid of this error by reseting your repositories as follows (see other options)

Code: Select all

 $sudo rm /etc/apt/sources.list #Backup in case something goes wrong
$sudo software-properties-gtk
Select your options
Save
$sudo apt-get update
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 185
Posts: 5454
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#2

This error: An error occurred, please run Package Manager from the right-click menu or apt-get in a teminal to see what is wrong. The error message was :'Error:BrokenCount>0'. This usually means that your installed packages have unment dependences

re-recurred after an attempt to install texlive-full and VirtualBox on Ubuntu 18.04 LTS (Bionic Beaver).

Below is then series of errors that followed when I was updating repository, and how were fixed.

1 . N: Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository 'http://download.virtualbox.org/virtualbox/debian bionic InRelease' doesn't support architecture 'i386'

Open the Terminal and

$echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

The problem was solved.

2.$sudo apt-get purge --autoremove texlive-full resulted to the error message:

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
python3-pil.imagetk : Depends: python3-tk (>= 3.4.1-2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


I tried to solve this error by installing Python3 tkinter:

$sudo apt-get install python3-tk

The operation above resulted into another error:

dpkg: error processing archive /var/cache/apt/archives/python3-tk_3.6.5-3_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.6/tkinter/__init__.py', which is also in package libpython3.6-stdlib:amd64 3.6.7-1+xenial1
Errors were encountered while processing:
/var/cache/apt/archives/python3-tk_3.6.5-3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


The solution to this error was

$sudo dpkg --install --force all /var/cache/apt/archives/python3-tk_3.6.5-3_amd64.deb

followed by

$sudo apt install -f

Finally

$sudo apt-get update

worked seamlessly perfect, and all the annoying errors were solved.
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux and Unix Based Operating Systems”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests