Announcement

Collapse
No announcement yet.

problem with openjdk-6-jre-headless [SOLVED]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    problem with openjdk-6-jre-headless [SOLVED]

    old intel-based desktop with 32 bit kubuntu 9.04.

    in the past couple of weeks every time i run an update it aborts it, saying it has a problem with openjdk-6-jre-headless. i've tried to manually reinstall it and even remove it via synaptic but again, it just told me it has a problem with it and aborted. what to do?

    #2
    Re: problem with openjdk-6-jre-headless

    Two things you might try for starters:

    1. Make sure no other applications are running when you do the upgrade. That would especially apply to openoffice.org and firefox.

    2. Try updating from the command line with the following:

    Code:
    sudo apt-get update
    sudo apt-get dist-upgrade
    If those still don't work, try logging out, log in to the command console, and do the update/dist-upgrade from there.
    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

    Comment


      #3
      Re: problem with openjdk-6-jre-headless

      when i do the distro update it tells me it has a problem with the java 6 files and it can't perform the update. when i try to reinstall or uninstall java 6 it gives me a message such as this:

      Code:
      E: sun-java6-bin: subprocess post-installation script returned error exit status 2
      i haven't tried logging in to the console (i don't know how to anyway but i'm willing to try messing with it and looking in forum archives if you think it might help) but i don't think it would do any good since it says that it can't continue with corrupt or missing files.

      Comment


        #4
        Re: problem with openjdk-6-jre-headless

        Sounds like there is some conflict between sun java and openjava.
        I have both on my system, and they coexist just fine.
        Hopefully someone with more expertise on java than I have can step in and help here.
        We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

        Comment


          #5
          Re: problem with openjdk-6-jre-headless

          they co-existed just fine on my machine too, this just started a week ago (i've had this kubuntu for a couple of months now).

          Comment


            #6
            Re: problem with openjdk-6-jre-headless

            Unless someone with more expertise jumps in, I would suggest the following:
            Code:
            sudo apt-get check
            If the doesn't tell you anything, then:
            Code:
            dpkg-query --status openjdk-6-jre-headless
            See if that tells you anything useful.

            You might also try:
            Code:
            sudo dpkg-reconfigure openjdk-6-jre-headless
            And see if that tells you anything useful.

            If not, the only thing left to do is completely remove all openjdk packages and reinstall.
            You might try that with synaptic, but if it fails, then you will have to do something like:
            Code:
            sudo apt-get remove --purge openjdk*
            or maybe do that for each individual openjdk package, and then do a reinstall.

            I'm shooting in the dark here, as I don't really know what's messed up. My guess is there's some mess up in the package database. If you try to do a remove and purge, be careful of what it tells you it's going to remove. It might try to remove kde altogether, for example, and you don't want that happening, at least not unexpectedly.

            We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

            Comment


              #7
              Re: problem with openjdk-6-jre-headless

              i've just tried all of the above. the check went fine, the status went fine, installing and uninstalling still returns an error. when i tried your purge idea (sudo apt-get remove --purge openjdk-6-jre-headless" it said some things will and won't get deleted, i read it carefully and saw it's only the java files and libraries so i clicked yes. it returned the following:

              Code:
              Removing default-jre ...
              Removing default-jre-headless ...
              Removing openjdk-6-jre ...
              Purging configuration files for openjdk-6-jre ...
              Removing ca-certificates-java ...
              Purging configuration files for ca-certificates-java ...
              Removing openjdk-6-jre-lib ...
              Removing openjdk-6-jre-headless ...
              update-alternatives: internal error: /var/lib/dpkg/alternatives/orbd corrupt: invalid update mode
              dpkg: error processing openjdk-6-jre-headless (--purge):
               subprocess pre-removal script returned error exit status 2
              Errors were encountered while processing:
               openjdk-6-jre-headless
              E: Sub-process /usr/bin/dpkg returned an error code (1)
              after that it simply aborted.

              Comment


                #8
                Re: problem with openjdk-6-jre-headless

                Looks like problems with the alternatives system. We should be able to fix it.

                1. Open a terminal: paste output from "update-alternatives --list java"
                2. Also paste output from "aptitude search sun-java6" and "aptitude search openjdk"

                UK
                linux && bash = "the future"

                Comment


                  #9
                  Re: problem with openjdk-6-jre-headless

                  update-alternatives --list java :
                  Code:
                  /usr/lib/jvm/java-6-sun/jre/bin/java
                  aptitude search sun-java6 :
                  Code:
                  CdA sun-java6-bin                   - Sun Java(TM) Runtime Environment (JRE) 6 (architecture depend
                  p  sun-java6-demo                   - Sun Java(TM) Development Kit (JDK) 6 demos and examples
                  p  sun-java6-doc                   - Sun JDK(TM) Documention -- integration installer
                  p  sun-java6-fonts                  - Lucida TrueType fonts (from the Sun JRE)
                  p  sun-java6-javadb                  - Java(TM) DB, Sun Microsystems' distribution of Apache Derby
                  p  sun-java6-jdk                   - Sun Java(TM) Development Kit (JDK) 6
                  idA sun-java6-jre                   - Sun Java(TM) Runtime Environment (JRE) 6 (architecture indepe
                  p  sun-java6-plugin                  - The Java(TM) Plug-in, Java SE 6
                  p  sun-java6-source                  - Sun Java(TM) Development Kit (JDK) 6 source files
                  aptitude search openjdk :
                  Code:
                  p  openjdk-6-dbg                   - Java runtime based on OpenJDK (debugging symbols)
                  p  openjdk-6-demo                   - Java runtime based on OpenJDK (demos and examples)
                  p  openjdk-6-doc                   - OpenJDK Development Kit (JDK) documentation
                  p  openjdk-6-jdk                   - OpenJDK Development Kit (JDK)
                  p  openjdk-6-jre                   - OpenJDK Java runtime, using Hotspot JIT
                  BdA openjdk-6-jre-headless               - OpenJDK Java runtime, using Hotspot JIT (headless)
                  p  openjdk-6-jre-lib                 - OpenJDK Java runtime (architecture independent libraries)
                  p  openjdk-6-jre-zero                 - Alternatve JVM for OpenJDK, using Zero/Shark
                  p  openjdk-6-source                  - OpenJDK Development Kit (JDK) source files
                  p  openjdk-6-source-files               - OpenJDK 6 source files (used as a build dependency)
                  p  openjdk-6-dbg                   - Java runtime based on OpenJDK (debugging symbols)
                  p  openjdk-6-demo                   - Java runtime based on OpenJDK (demos and examples)
                  p  openjdk-6-doc                   - OpenJDK Development Kit (JDK) documentation
                  p  openjdk-6-jdk                   - OpenJDK Development Kit (JDK)
                  p  openjdk-6-jre                   - OpenJDK Java runtime, using Hotspot JIT
                  BdA openjdk-6-jre-headless               - OpenJDK Java runtime, using Hotspot JIT (headless)
                  p  openjdk-6-jre-lib                 - OpenJDK Java runtime (architecture independent libraries)
                  p  openjdk-6-jre-zero                 - Alternatve JVM for OpenJDK, using Zero/Shark
                  p  openjdk-6-source                  - OpenJDK Development Kit (JDK) source files
                  p  openjdk-6-source-files               - OpenJDK 6 source files (used as a build dependency)
                  p  openjdk-6-dbg                   - Java runtime based on OpenJDK (debugging symbols)
                  p  openjdk-6-demo                   - Java runtime based on OpenJDK (demos and examples)
                  p  openjdk-6-doc                   - OpenJDK Development Kit (JDK) documentation
                  p  openjdk-6-jdk                   - OpenJDK Development Kit (JDK)
                  p  openjdk-6-jre                   - OpenJDK Java runtime, using Hotspot JIT
                  BdA openjdk-6-jre-headless               - OpenJDK Java runtime, using Hotspot JIT (headless)
                  p  openjdk-6-jre-lib                 - OpenJDK Java runtime (architecture independent libraries)
                  p  openjdk-6-jre-zero                 - Alternatve JVM for OpenJDK, using Zero/Shark
                  p  openjdk-6-source                  - OpenJDK Development Kit (JDK) source files
                  p  openjdk-6-source-files               - OpenJDK 6 source files (used as a build dependency)
                  that's after trying to uninstall and reinstall almost every day in the past week or so.

                  Comment


                    #10
                    Re: problem with openjdk-6-jre-headless

                    Try these commands from a terminal:

                    Code:
                    sudo aptitude keep-all
                    sudo aptitude clean
                    sudo aptitude update
                    sudo aptitude install sun-java6-bin
                    sudo aptitude install sun-java6-jre
                    sudo update-alternatives --config java (select /usr/lib/jvm/java-6-sun/jre/bin/java if given the choice)
                    sudo aptitude purge -f openjdk-jre-headless
                    UK

                    linux && bash = "the future"

                    Comment


                      #11
                      Re: problem with openjdk-6-jre-headless

                      thanks for the reply. did what you suggested and this is what i got, i just did copy/paste from the terminal (with the necessary masking). sorry, i don't know how to do a scroll-box here:

                      Code:
                      ***@***:~$ sudo aptitude keep-all
                      [sudo] password for ***:      
                      Reading package lists... Done    
                      Building dependency tree       
                      Reading state information... Done  
                      Initializing package states... Done 
                      Writing extended state information... Done
                      The following packages are BROKEN:    
                       openjdk-6-jre-headless         
                      The following partially installed packages will be configured:
                       sun-java6-bin                        
                      0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                      Need to get 0B of archives. After unpacking 0B will be used.      
                      The following packages have unmet dependencies:            
                       openjdk-6-jre-headless: Depends: openjdk-6-jre-lib (>= 6b14-1.4.1-0ubuntu11) but it is not installable
                                   Depends: ca-certificates-java but it is not installable            
                      The following actions will resolve these dependencies:                         
                      
                      Remove the following packages:
                      openjdk-6-jre-headless    
                      
                      Score is 121
                      
                      Accept this solution? [Y/n/q/?] y
                      The following packages will be REMOVED:
                       openjdk-6-jre-headless{a}      
                      The following partially installed packages will be configured:
                       sun-java6-bin                        
                      0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
                      Need to get 0B of archives. After unpacking 76.9MB will be freed.   
                      Do you want to continue? [Y/n/?] y                   
                      Writing extended state information... Done               
                      (Reading database ... 185390 files and directories currently installed.)
                      Removing openjdk-6-jre-headless ...                   
                      update-alternatives: internal error: /var/lib/dpkg/alternatives/orbd corrupt: invalid update mode
                      dpkg: error processing openjdk-6-jre-headless (--remove):                    
                       subprocess pre-removal script returned error exit status 2                   
                      Errors were encountered while processing:                            
                       openjdk-6-jre-headless                                     
                      E: Sub-process /usr/bin/dpkg returned an error code (1)                     
                      A package failed to install. Trying to recover:                         
                      Reading package lists... Done                                  
                      Building dependency tree                                     
                      Reading state information... Done                                
                      Reading extended state information                                
                      Initializing package states... Done                               
                      Writing extended state information... Done                            
                      
                      ***@***:~$ sudo aptitude clean
                      Reading package lists... Done   
                      Building dependency tree     
                      Reading state information... Done 
                      Reading extended state information   
                      Initializing package states... Done   
                      ***@***:~$ sudo aptitude update
                      Hit [url]http://archive.ubuntu.com[/url] jaunty Release.gpg
                      Ign [url]http://archive.ubuntu.com[/url] jaunty/main Translation-en_US
                      Hit [url]http://archive.canonical.com[/url] jaunty Release.gpg    
                      Ign [url]http://archive.canonical.com[/url] jaunty/partner Translation-en_US
                      Ign [url]http://archive.ubuntu.com[/url] jaunty/restricted Translation-en_US
                      Ign [url]http://archive.ubuntu.com[/url] jaunty/universe Translation-en_US 
                      Ign [url]http://archive.ubuntu.com[/url] jaunty/multiverse Translation-en_US
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-updates Release.gpg     
                      Ign [url]http://archive.ubuntu.com[/url] jaunty-updates/main Translation-en_US
                      Ign [url]http://archive.ubuntu.com[/url] jaunty-updates/restricted Translation-en_US
                      Hit [url]http://archive.canonical.com[/url] jaunty Release             
                      Ign [url]http://archive.ubuntu.com[/url] jaunty-updates/universe Translation-en_US 
                      Ign [url]http://archive.ubuntu.com[/url] jaunty-updates/multiverse Translation-en_US
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-security Release.gpg        
                      Ign [url]http://archive.ubuntu.com[/url] jaunty-security/main Translation-en_US   
                      Ign [url]http://archive.ubuntu.com[/url] jaunty-security/restricted Translation-en_US
                      Ign [url]http://archive.ubuntu.com[/url] jaunty-security/universe Translation-en_US 
                      Ign [url]http://archive.ubuntu.com[/url] jaunty-security/multiverse Translation-en_US
                      Hit [url]http://archive.ubuntu.com[/url] jaunty Release               
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-updates Release           
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-security Release           
                      Hit [url]http://archive.canonical.com[/url] jaunty/partner Packages         
                      Hit [url]http://archive.ubuntu.com[/url] jaunty/main Packages            
                      Hit [url]http://archive.canonical.com[/url] jaunty/partner Sources          
                      Hit [url]http://archive.ubuntu.com[/url] jaunty/restricted Packages         
                      Hit [url]http://archive.ubuntu.com[/url] jaunty/restricted Sources          
                      Hit [url]http://archive.ubuntu.com[/url] jaunty/main Sources             
                      Hit [url]http://archive.ubuntu.com[/url] jaunty/multiverse Sources          
                      Hit [url]http://archive.ubuntu.com[/url] jaunty/universe Sources           
                      Hit [url]http://archive.ubuntu.com[/url] jaunty/universe Packages          
                      Hit [url]http://archive.ubuntu.com[/url] jaunty/multiverse Packages         
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-updates/main Packages        
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-updates/restricted Packages     
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-updates/restricted Sources      
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-updates/main Sources         
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-updates/multiverse Sources      
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-updates/universe Sources       
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-updates/universe Packages      
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-updates/multiverse Packages     
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-security/main Packages        
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-security/restricted Packages     
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-security/restricted Sources     
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-security/main Sources        
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-security/multiverse Sources     
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-security/universe Sources      
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-security/universe Packages      
                      Hit [url]http://archive.ubuntu.com[/url] jaunty-security/multiverse Packages     
                      Reading package lists... Done                       
                      
                      ***@***:~$ sudo aptitude install sun-java6-bin
                      Reading package lists... Done           
                      Building dependency tree             
                      Reading state information... Done         
                      Reading extended state information        
                      Initializing package states... Done        
                      The following packages are BROKEN:        
                       openjdk-6-jre-headless             
                      The following partially installed packages will be configured:
                       sun-java6-bin                        
                      0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                      Need to get 0B of archives. After unpacking 0B will be used.      
                      The following packages have unmet dependencies:            
                       openjdk-6-jre-headless: Depends: openjdk-6-jre-lib (>= 6b14-1.4.1-0ubuntu11) but it is not installable
                                   Depends: ca-certificates-java but it is not installable            
                      The following actions will resolve these dependencies:                         
                      
                      Remove the following packages:
                      openjdk-6-jre-headless    
                      
                      Score is 121
                      
                      Accept this solution? [Y/n/q/?] y
                      The following packages will be REMOVED:
                       openjdk-6-jre-headless{a}      
                      The following partially installed packages will be configured:
                       sun-java6-bin                        
                      0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
                      Need to get 0B of archives. After unpacking 76.9MB will be freed.   
                      Do you want to continue? [Y/n/?] y                   
                      Writing extended state information... Done               
                      (Reading database ... 185390 files and directories currently installed.)
                      Removing openjdk-6-jre-headless ...                   
                      update-alternatives: internal error: /var/lib/dpkg/alternatives/orbd corrupt: invalid update mode
                      dpkg: error processing openjdk-6-jre-headless (--remove):                    
                       subprocess pre-removal script returned error exit status 2                   
                      Errors were encountered while processing:                            
                       openjdk-6-jre-headless                                     
                      E: Sub-process /usr/bin/dpkg returned an error code (1)                     
                      A package failed to install. Trying to recover:                         
                      Reading package lists... Done                                  
                      Building dependency tree                                     
                      Reading state information... Done                                
                      Reading extended state information                                
                      Initializing package states... Done                               
                      
                      ***@***:~$ sudo aptitude install sun-java6-jre
                      Reading package lists... Done           
                      Building dependency tree             
                      Reading state information... Done         
                      Reading extended state information        
                      Initializing package states... Done        
                      The following packages are BROKEN:        
                       openjdk-6-jre-headless             
                      The following partially installed packages will be configured:
                       sun-java6-bin                        
                      0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                      Need to get 0B of archives. After unpacking 0B will be used.      
                      The following packages have unmet dependencies:            
                       openjdk-6-jre-headless: Depends: openjdk-6-jre-lib (>= 6b14-1.4.1-0ubuntu11) but it is not installable
                                   Depends: ca-certificates-java but it is not installable            
                      The following actions will resolve these dependencies:                         
                      
                      Remove the following packages:
                      openjdk-6-jre-headless    
                      
                      Score is 121
                      
                      Accept this solution? [Y/n/q/?] y
                      The following packages will be REMOVED:
                       openjdk-6-jre-headless{a}      
                      The following partially installed packages will be configured:
                       sun-java6-bin                        
                      0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
                      Need to get 0B of archives. After unpacking 76.9MB will be freed.   
                      Do you want to continue? [Y/n/?] y                   
                      Writing extended state information... Done               
                      (Reading database ... 185390 files and directories currently installed.)
                      Removing openjdk-6-jre-headless ...                   
                      update-alternatives: internal error: /var/lib/dpkg/alternatives/orbd corrupt: invalid update mode
                      dpkg: error processing openjdk-6-jre-headless (--remove):                    
                       subprocess pre-removal script returned error exit status 2                   
                      Errors were encountered while processing:                            
                       openjdk-6-jre-headless                                     
                      E: Sub-process /usr/bin/dpkg returned an error code (1)                     
                      A package failed to install. Trying to recover:                         
                      Reading package lists... Done                                  
                      Building dependency tree                                     
                      Reading state information... Done                                
                      Reading extended state information                                
                      Initializing package states... Done                               
                      
                      ***@***:~$ sudo update-alternatives --config java
                      
                      There is only 1 program which provides java
                      (/usr/lib/jvm/java-6-sun/jre/bin/java). Nothing to configure.
                      ***@***:~$ sudo aptitude purge -f openjdk-jre-headless
                      Reading package lists... Done               
                      Building dependency tree                 
                      Reading state information... Done             
                      Reading extended state information            
                      Initializing package states... Done            
                      Couldn't find any package whose name or description matched "openjdk-jre-headless"
                      Couldn't find any package whose name or description matched "openjdk-jre-headless"
                      The following packages are BROKEN:                        
                       openjdk-6-jre-headless                             
                      The following partially installed packages will be configured:          
                       sun-java6-bin                                  
                      0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.      
                      Need to get 0B of archives. After unpacking 0B will be used.           
                      The following packages have unmet dependencies:
                       openjdk-6-jre-headless: Depends: openjdk-6-jre-lib (>= 6b14-1.4.1-0ubuntu11) but it is not installable
                                   Depends: ca-certificates-java but it is not installable
                      The following actions will resolve these dependencies:
                      
                      Remove the following packages:
                      openjdk-6-jre-headless
                      
                      Score is 121
                      
                      Accept this solution? [Y/n/q/?] y
                      The following packages will be REMOVED:
                       openjdk-6-jre-headless{a}
                      The following partially installed packages will be configured:
                       sun-java6-bin
                      0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
                      Need to get 0B of archives. After unpacking 76.9MB will be freed.
                      Do you want to continue? [Y/n/?] y
                      Writing extended state information... Done
                      (Reading database ... 185390 files and directories currently installed.)
                      Removing openjdk-6-jre-headless ...
                      update-alternatives: internal error: /var/lib/dpkg/alternatives/orbd corrupt: invalid update mode
                      dpkg: error processing openjdk-6-jre-headless (--remove):
                       subprocess pre-removal script returned error exit status 2
                      Errors were encountered while processing:
                       openjdk-6-jre-headless
                      E: Sub-process /usr/bin/dpkg returned an error code (1)
                      A package failed to install. Trying to recover:
                      Reading package lists... Done
                      Building dependency tree
                      Reading state information... Done
                      Reading extended state information
                      Initializing package states... Done

                      Comment


                        #12
                        Re: problem with openjdk-6-jre-headless

                        I made one mistake in my previous post. It should of been "sudo aptitude purge -f openjdk-6-jre-headless" instead of "sudo aptitude purge -f openjdk-jre-headless". Run the corrected command. I think we are close to a resolution. Paste the output from "aptitude search openjdk" again. I want to make sure no openjdk packages are installed, then go ahead and execute "sudo aptitude full-upgrade" to upgrade your system. If all goes well, no errors, you can reinstall openjdk again if you like. It's not necessary to have both.

                        UK
                        linux && bash = "the future"

                        Comment


                          #13
                          Re: problem with openjdk-6-jre-headless

                          Code:
                          ***@***:~$ aptitude search openjdk
                          p  openjdk-6-dbg                   - Java runtime based on OpenJDK (debugging symbols)
                          p  openjdk-6-demo                   - Java runtime based on OpenJDK (demos and examples)
                          p  openjdk-6-doc                   - OpenJDK Development Kit (JDK) documentation
                          p  openjdk-6-jdk                   - OpenJDK Development Kit (JDK)
                          p  openjdk-6-jre                   - OpenJDK Java runtime, using Hotspot JIT
                          Bd openjdk-6-jre-headless               - OpenJDK Java runtime, using Hotspot JIT (headless)
                          p  openjdk-6-jre-lib                 - OpenJDK Java runtime (architecture independent libraries)
                          p  openjdk-6-jre-zero                 - Alternatve JVM for OpenJDK, using Zero/Shark
                          p  openjdk-6-source                  - OpenJDK Development Kit (JDK) source files
                          p  openjdk-6-source-files               - OpenJDK 6 source files (used as a build dependency)

                          i haven't touched it since my previous post. didn't seem to delete much, did it?

                          Comment


                            #14
                            Re: problem with openjdk-6-jre-headless

                            I blundered.

                            The command should be "sudo aptitude purge -f openjdk-6-jre-headless". I got the package name wrong in my previous post.

                            That should do it. Run "sudo aptitude full-upgrade" to upgrade.
                            linux && bash = "the future"

                            Comment


                              #15
                              Re: problem with openjdk-6-jre-headless

                              doesn't look like this did the trick either. even after purging it still told me i have the corrupt file.:

                              Code:
                              ***@***:~$ sudo aptitude purge -f openjdk-6-jre-headless
                              [sudo] password for ***:                 
                              Reading package lists... Done                
                              Building dependency tree                  
                              Reading state information... Done              
                              Reading extended state information             
                              Initializing package states... Done             
                              The following packages will be REMOVED:           
                               openjdk-6-jre-headless{p}                 
                              The following partially installed packages will be configured:
                               sun-java6-bin                        
                              0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
                              Need to get 0B of archives. After unpacking 76.9MB will be freed.   
                              Do you want to continue? [Y/n/?] y                   
                              Writing extended state information... Done               
                              (Reading database ... 185390 files and directories currently installed.)
                              Removing openjdk-6-jre-headless ...                   
                              update-alternatives: internal error: /var/lib/dpkg/alternatives/orbd corrupt: invalid update mode
                              dpkg: error processing openjdk-6-jre-headless (--purge):                     
                               subprocess pre-removal script returned error exit status 2                   
                              Errors were encountered while processing:                            
                               openjdk-6-jre-headless                                     
                              E: Sub-process /usr/bin/dpkg returned an error code (1)                     
                              A package failed to install. Trying to recover:                         
                              Reading package lists... Done                                  
                              Building dependency tree                                     
                              Reading state information... Done                                
                              Reading extended state information                                
                              Initializing package states... Done                               
                              Writing extended state information... Done                            
                              
                              ***@***:~$ sudo aptitude full-upgrade
                              Reading package lists... Done      
                              Building dependency tree         
                              Reading state information... Done    
                              Reading extended state information    
                              Initializing package states... Done   
                              The following packages are BROKEN:    
                               openjdk-6-jre-headless         
                              The following partially installed packages will be configured:
                               sun-java6-bin                        
                              0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                              Need to get 0B of archives. After unpacking 0B will be used.      
                              The following packages have unmet dependencies:            
                               openjdk-6-jre-headless: Depends: openjdk-6-jre-lib (>= 6b14-1.4.1-0ubuntu11) but it is not installable
                                           Depends: ca-certificates-java but it is not installable
                              The following actions will resolve these dependencies:
                              
                              Remove the following packages:
                              openjdk-6-jre-headless
                              
                              Score is 121
                              
                              Accept this solution? [Y/n/q/?] y
                              The following packages will be REMOVED:
                               openjdk-6-jre-headless{a}
                              The following partially installed packages will be configured:
                               sun-java6-bin
                              0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
                              Need to get 0B of archives. After unpacking 76.9MB will be freed.
                              Do you want to continue? [Y/n/?] y
                              Writing extended state information... Done
                              (Reading database ... 185390 files and directories currently installed.)
                              Removing openjdk-6-jre-headless ...
                              update-alternatives: internal error: /var/lib/dpkg/alternatives/orbd corrupt: invalid update mode
                              dpkg: error processing openjdk-6-jre-headless (--remove):
                               subprocess pre-removal script returned error exit status 2
                              Errors were encountered while processing:
                               openjdk-6-jre-headless
                              E: Sub-process /usr/bin/dpkg returned an error code (1)
                              A package failed to install. Trying to recover:
                              Reading package lists... Done
                              Building dependency tree
                              Reading state information... Done
                              Reading extended state information
                              Initializing package states... Done
                              Writing extended state information... Done

                              Comment

                              Working...
                              X