10

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:
 tvbrowser

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 .

jokerdino
  • 41,320
xralf
  • 45
  • 1
    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 07 '11 at 13:48
  • I wrote error message to the robin0800 answer. LC_ALL=C is some command? – xralf Apr 07 '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 07 '11 at 14:01
  • OK, error message is similar as in my answer. – xralf Apr 07 '11 at 14:08
  • @xralf: The package sun-java6-jre package can be found in the partner repository. Can you post your repository sources? – Lekensteyn Apr 07 '11 at 14:13
  • Could you please learn me how to solve it? How to find out that it's in the partner repository, in which repository it is and what to edit and why this caused this strange problem? – xralf Apr 07 '11 at 14:22
  • @xralf: Can you post your repository sources (described in my last comment)? tvbrowser is not part of the Ubuntu repository by default. – Lekensteyn Apr 07 '11 at 14:33
  • So, how did you find out that it is not part? And why this caused that error? There should happen some error in the apt-get application. Where can I post the output of "cat /etc/apt/sources.list"? It's quite a long file. – xralf Apr 07 '11 at 14:40
  • 1
    @xralf you can put it on pastebin.ubuntu.com – Jorge Castro Apr 07 '11 at 15:52
  • 1
    @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 07 '11 at 16:36
  • This is the output of "find /etc/apt/ -name '*.list' -ls -exec cat {} ; > repositories.txt" – xralf Apr 07 '11 at 17:37
  • @xralf Can you add this information to your original question? Comments get buried, it's best to put as much information in your question by editing it, thanks! – Jorge Castro Apr 07 '11 at 21:21

3 Answers3

12

The standard way to repair the dpkg database is to use this command:

sudo dpkg --configure -a
jokerdino
  • 41,320
robin0800
  • 1,092
10

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

dpkg: dependency problems prevent configuration of tvbrowser:

Try:

 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.

belacqua
  • 23,120
1

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.

jokerdino
  • 41,320
Thomas Ward
  • 74,764