Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to install new package with apt-get install, it doesn't work. apt-get update doesn't work too.

Do you know how to reinstall it to work again?

Output from sudo dpkg --configure -a :

dpkg: dependency problems prevent configuration of tvbrowser:
 tvbrowser depends on sun-java6-jre | sun-java5-jre; however:
  Package sun-java6-jre is not installed.
  Package sun-java5-jre is not installed.
dpkg: error processing tvbrowser (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:

Output from sudo apt-get install sun-java6-jre

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package sun-java6-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jre has no installation candidate

This pastebin has the output of find /etc/apt/ -name '*.list' -ls -exec cat {} \; > repositories.txt .

share|improve this question
Provide more information please, like error messages. Please run LC_ALL=C sudo apt-get install [package-name] (replace [package-name] with the package you're trying to install) and report the error messages. – Lekensteyn Apr 7 '11 at 13:48
I wrote error message to the robin0800 answer. LC_ALL=C is some command? – xralf Apr 7 '11 at 13:58
@xralf Please add the details to your question, not someone's answer. Adding LC_ALL=C before a program sets the environment variable LC_ALL to C. This makes a command using the English language (assuming you're not using an English system). – Lekensteyn Apr 7 '11 at 14:01
@xralf you can put it on – Jorge Castro Apr 7 '11 at 15:52
@xralf see How do I find all of my software sources?. Using just cat /etc/apt/sources.list is not enough, you might have added some addition stuff in /etc/apt/sources.list.d – Lekensteyn Apr 7 '11 at 16:36
up vote 7 down vote accepted

What I am noticing from your output of the error is this:

dpkg: dependency problems prevent configuration of tvbrowser:


 sudo apt-get -f install

This should satisfy dependencies not met when you installed a .deb file in Ubuntu. It may end up asking you if it is ok to download those dependencies.

Hope this helps, if it helps.

share|improve this answer
-f option didn't help – xralf Apr 7 '11 at 15:33
-f option without package name solved this. Thanks. – xralf Apr 8 '11 at 16:33

The standard way to repair the dpkg database is to use this command
sudo dpkg --configure -a

share|improve this answer

The error you are getting explains what packages are missing.

Do the following in terminal, and it will fix the dependency issue:

sudo apt-get install sun-java6-jre

That should immediately fix any issues you are having.

share|improve this answer
Note this does not work in Oneiric or later. – Thomas Ward May 7 '12 at 22:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.