Package system is broken. How to fix it?
I just recently bought an arduino and requires gcc-avr/avrdude to compile the software. I installed avr for another microprocessor component a while ago but is obviously an outdated version (gcc version 3.3 20030512 (prerelease)) so I went ahead to update these but it didn't work.
(Please note that before hand I also broke my aptdaemon through an incomplete wine installation (couldn't get passed font installation agreement) but I fixed that via a re-installation then accepting the agreement.)
I am trying to update these by running bingo's build script but the dependencies it requires cannot be installed due to avr... terminal reports
Reading package lists... Done Building dependency tree Reading state information... Done build-essential is already the newest version. libncurses5-dev is already the newest version. libncurses5-dev set to manually installed. libusb-0.1-4 is already the newest version. libx11-dev is already the newest version. You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: arduino-core : Depends: gcc-avr but it is not going to be installed avr-libc : Depends: gcc-avr (>= 1:4.3.4) but it is not going to be installed Depends: binutils-avr (>= 2.20) but it is not going to be installed binutils-dev : Depends: binutils (= 2.21.0.20110327-2ubuntu3) but 2.21.0.20110327-2ubuntu2 is to be installed libcwidget-dev : Depends: libcwidget3 (= 0.5.16-3ubuntu2) but it is not going to be installed Depends: libsigc++-2.0-dev but it is not going to be installed Depends: libncursesw5-dev but it is not going to be installed libmpfr-dev : Depends: libgmp3-dev (>= 4.2.dfsg-1) but it is not going to be installed python-dev : Depends: python (= 2.7.1-0ubuntu5.1) but 2.7.1-0ubuntu5 is to be installed Depends: python2.7-dev (>= 2.7.1-1~) but it is not going to be installed tk8.4-dev : Depends: tk8.4 (= 8.4.19-4) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
But running
apt-get -f install
results in
(Reading database ... 163021 files and directories currently installed.) Unpacking binutils-avr (from .../binutils-avr_2.20.1-1ubuntu2_i386.deb) ... dpkg: error processing /var/cache/apt/archives/binutils-avr_2.20.1-1ubuntu2_i386.deb (--unpack): trying to overwrite '/usr/bin/avr-size', which is also in package avr-binutils 2.13.90.030512-2 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Unpacking gcc-avr (from .../gcc-avr_1%3a4.3.5-1_i386.deb) ... dpkg: error processing /var/cache/apt/archives/gcc-avr_1%3a4.3.5-1_i386.deb (--unpack): trying to overwrite '/usr/bin/avr-g++', which is also in package avr-gcc-c++ 3.2.90.20030512-2 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/binutils-avr_2.20.1-1ubuntu2_i386.deb /var/cache/apt/archives/gcc-avr_1%3a4.3.5-1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
I have tried running update manager and updating my system via it but all I get is an error message
The following packages have unmet dependencies: arduino-core: Depends: gcc-avr but it is not installed avr-libc: Depends: gcc-avr (>= 1:4.3.4) but it is not installed Depends: binutils-avr (>= 2.20) but it is not installed
which then tells me to try running apt-get -f install which just results the same as last time.
So how can I fix my system, I really need the new avr, please :) BTW, my system is Ubuntu 11.04
Yes, why? I shouldn't have it?
Same error (but based on `libboost`). None of the answers worked for me.
After you get that error, try
sudo apt-get -f install
to force an install of the files that didn't get loaded because of the error.Then try
sudo apt-get update
again,sudo apt-get -f install
back and forth until only the package that has the error is left.sudo dpkg --configure -a
and clean the cache
sudo apt-get clean
Thanks for the answer, but I found a solution just as you posted this :P I opened synaptic package manager and filtered out two broken packages which I then removed with SPM, which now everything runs sweet and smooth. Managed to install the dependencies and I am now installing avr using bingo's script! :) It's not finished yet but if it fails I will try your answer
good to hear its fixed
ok, Just deleted 11.04 partition and fresh installed 11.10. now running it alongside windows vista. So now I have the latest avr/binutils/libs etc installed. So I can now compile things for arduino :) yay!
As a result of this problem, I also failed to load mouse drivers and WLAN drivers. That means I have no more internet connection and can't use `sudo apt-get -f install`.
doesn't work for me, `sudo apt-get -f install` also crashes
This usually happens as a result of 'Unmet dependencies for installed packages'.
Here's a simple solution if you have 'Synaptic' installed:
- Open Synaptic.
- Go To 'Status' (in the left navigation).
- Choose 'Broken'.
- Remove these broken packages.
Otherwise it can be dealt via CLI:
Open terminal and run this command:
sudo apt-get clean
Above command will clean out the local repository of retrieved package file.
sudo apt-get install -f
Will correct broken dependencies i.e.
-f
here stands for “fix broken”.sudo dpkg --configure -a
will configure all (
-a
) the packages which haven't been configured yet. In the end do run the update commandsudo apt-get update
.As a result of this problem, I also failed to load mouse drivers and WLAN drivers. That means I have no more internet connection and can't use `sudo apt-get -f install`.
You can use an offline/portable package manger i.e Keryx or Cube - help you download packages and latest repositories (in a folder or directly to pendrive) from some other computer with the internet connection (Linux or Windows), once done plug the pendrive to the computer w/o internet connection, and install the downloaded packages.
A step-by-step tutorial for using Cube (haven't used it myself) - http://community.linuxmint.com/tutorial/view/1583
Another askubuntu answer with step-by-step Keryx setup - http://askubuntu.com/a/181913/58950
I was able to resolve just using `sudo apt-get install -f` and `sudo dpkg --configure -a`.. after a reboot I got back network, audio and so on :)
Open synaptic
. Then go to status and choose Broken. Then remove completely the broken packages.
This should correct your system.
I'm on Ubuntu 12.04. As soon as I opened Synaptics Software Center, it said the catalog was broken and must be repaired, and offered me a repair button, which cleared up the problem right away.
Try:
sudo apt-get update && sudo apt-get -f install
I hope that this will resolve the issue.Didn't resolve for me.
As a result of this problem, I also failed to load mouse drivers and WLAN drivers. That means I have no more internet connection and can't use `sudo apt-get -f install`.
Had the same problem, an
sudo apt-get clean
followed by an
sudo apt-get update
followed by an
sudo apt-get upgrade -f
fixed it. I hope this helps!
As a result of this problem, I also failed to load mouse drivers and WLAN drivers. That means I have no more internet connection and can't use `sudo apt-get -f install`.
If you're not already, try changing your package repository reference to 'Main' or the United States. Doing this fixed my Python-dev unmet-dependencies problem (my 12.04 install was using the United Kingdom package repository, previously).
- In 'Ubuntu Software Center' (USC) go to the menu/tab 'Edit => Software Sources'.
- Change the 'Download from' drop-down value to 'Main Server' or a server in the United States.
- Leave USC, the open 'Update Manager' from Ubuntu's program menu, and 'Check' for software update (or issue 'sudo apt-get update' in a terminal window).
- Update your software as you normally would, e.g. via 'Update Manager' or apt-get/aptitude in a terminal.
This repaired my repository and I went on to install whatever I needed afterwards, as normal.
Before rectifying my problem with the above instructions, various aptitude/apt-get commands suggested that I remove many, many packages, but, as you can apreciate, I didn't fancy loosing my 6-months+ of package additions, and that's even though I snapshot the package list at times (see my gist for hints)! I'm really glad I found out about the instructions I'm leaving here.
Hope this helps.
License under CC-BY-SA with attribution
Content dated before 6/26/2020 9:53 AM
8 years ago
Do you have synaptic installed in your system?!