Take the 2-minute tour ×

I have a laptop with dead battery that when there is no current connected to it turns critical so fast and in the energy management in Ubuntu, when the battery is critical, there are 2 options: shutdown and hibernate witch is in grey (unclickable), so I have no choice but to chose immediate shutdown, there is no standby even if it is an option in the screen behavior. An immediate shutdown (and I mean by immediate the one that we use when we ended using the computer) happened while I was installing a program called quickly, so after the power was restored, I tried to reinstall the program then I get this translated message:

An untreatable error occurred:

It seems there is a software error in aptdaemon, the program that lets you install and remove software and any other task related to package management.


Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 968, in simulate
    trans.unauthenticated = self._simulate_helper(trans)
  File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 1092, in _simulate_helper
    return depends, self._cache.required_download, \
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 235, in required_download
    pm.get_archives(fetcher, self._list, self._records)
SystemError: E:I wasn't able to locate a file for the libpng12-dev package. This might mean you need to manually fix this package.
share|improve this question

2 Answers 2

up vote 0 down vote accepted

open the terminal and type

sudo apt-get install -f
share|improve this answer
Thanks! Actually when I submitted your command it told me that it is necessary to use the sudo dpkg --configure -a command to repair the problem. So I submitted that one and it did it great. Why no one integrated graphical version of this reparation as response instead of the error box i received?! its quite simple as solution... –  nightweels Mar 25 '12 at 0:23
@nightweels Why don't you submit a request at Ubuntu Brainstorm? –  hexafraction Jun 28 '12 at 18:14

Get off battery and use AC power. On boot, you can choose safe boot mode, and then choose repair broken packages.

share|improve this answer
Could you elaborate? My 11.10 with default settings just goes to a Bourne Shell in recovery mode without a menu, so those instructions may not apply. –  hexafraction Jun 28 '12 at 18:14

Your Answer


