Announcement

Collapse
No announcement yet.

Java problems

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

    Java problems

    Hello, I installed Kubuntu three weeks ago and I am very happy with it. I love the speed of browsing the web compared to what I had before. I am just on dial-up (that's what u get for living too much north) and let me tell you: It's much faster.

    Anyways. I encountered some a problem with the Java. I installed the Java plugin through

    sudo apt-get install kubuntu-restricted-extras

    but something went wrong in the installation. Everything else works (MP3, playing DVDs, etc) but the Java seems not. I remember some error about dependency problems.

    If I type "Java" in the console, I get he following:
    loslocos@loslocos:~$ java
    The program 'java' can be found in the following packages:
    * cacao
    * j2re1.4
    * kaffe
    * jamvm
    * java-gcj-compat
    * gij-4.1
    * gij-4.2
    * sablevm
    Try: sudo apt-get install <selected package>
    bash: java: command not found
    loslocos@loslocos:~$

    I tried to reinstall it using sudo apt-get install sun-java6-plugin but this is what happens:
    loslocos@loslocos:~$ sudo apt-get install sun-java6-plugin
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    sun-java6-plugin is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    2 not fully installed or removed.
    Need to get 0B of archives.
    After unpacking, 0B of additional disk space will be used.
    Setting up sun-java6-bin (6-03-0ubuntu2) ...
    /var/lib/dpkg/info/sun-java6-bin.postinst: 84: /usr/lib/jvm/java-6-sun-1.6.0.03/bin/java: not found
    dpkg: error processing sun-java6-bin (--configure):
    subprocess post-installation script returned error exit status 127
    dpkg: dependency problems prevent configuration of sun-java6-plugin:
    sun-java6-plugin depends on sun-java6-bin (= 6-03-0ubuntu2); however:
    Package sun-java6-bin is not configured yet.
    dpkg: error processing sun-java6-plugin (--configure):
    dependency problems - leaving unconfigured
    Errors were encountered while processing:
    sun-java6-bin
    sun-java6-plugin
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    loslocos@loslocos:~$

    hmm. Then I tried purging it (is is installed or not) but this is what I am getting:
    sudo dpkg --purge sun-java6-bin
    dpkg: dependency problems prevent removal of sun-java6-bin:
    sun-java6-jre depends on sun-java6-bin (= 6-03-0ubuntu2) | ia32-sun-java6-bin (= 6-03-0ubuntu2); however:
    Package sun-java6-bin is to be removed.
    Package ia32-sun-java6-bin is not installed.
    dpkg: error processing sun-java6-bin (--purge):
    dependency problems - not removing
    Errors were encountered while processing:
    sun-java6-bin
    loslocos@loslocos:~$

    The folder /usr/lib/jvm/java-6-sun-1.6.0.03/bin exists, there a bunch of files in there but there is no subdirectory.

    Anybody having an idea what I can do to get the Java working? I appreciate your help.
    Please help - I need it.

    #2
    Re: Java problems

    I forgot:
    Adept Manager shows the following items as installed:
    sun-java6-bin
    sun-java6-jdk
    sun-java6-jre
    sun-java6-plugin
    Please help - I need it.

    Comment


      #3
      Re: Java problems

      dpkg --configure --pending
      dpkg --audit
      at the konsole.

      Once you get your package system back in order, look at the directory /usr/lib/jvm.
      Inspect the shortcut java-gcj to see where it points.
      I had to manually change this shortcut in order to run the correct version of java. I think the shortcuts get messed up when you have 1.4.2 installed and then later go with the newer versions.
      FKA: tanderson

      Comment


        #4
        Re: Java problems

        Hmm. It seems that did not configure the Java properly. Output:

        loslocos@loslocos:~$ sudo dpkg --configure --pending
        [sudo] password for loslocos:
        dpkg: dependency problems prevent configuration of sun-java6-plugin:
        sun-java6-plugin depends on sun-java6-bin (= 6-03-0ubuntu2); however:
        Package sun-java6-bin is not configured yet.
        dpkg: error processing sun-java6-plugin (--configure):
        dependency problems - leaving unconfigured
        Errors were encountered while processing:
        sun-java6-plugin
        loslocos@loslocos:~$

        The audit still shows Java half configured:

        loslocos@loslocos:~$ dpkg --audit
        The following packages have been unpacked but not yet configured.
        They must be configured using dpkg --configure or the configure
        menu option in dselect for them to work:
        sun-java6-plugin The Java(TM) Plug-in, Java SE 6

        The following packages are only half configured, probably due to problems
        configuring them the first time. The configuration should be retried using
        dpkg --configure <package> or the configure menu option in dselect:
        sun-java6-bin Sun Java(TM) Runtime Environment (JRE) 6 (architecture de

        loslocos@loslocos:~$

        If I try to configure the bin, I get the following:
        loslocos@loslocos:~$ sudo dpkg --configure sun-java6-bin
        Setting up sun-java6-bin (6-03-0ubuntu2) ...
        /var/lib/dpkg/info/sun-java6-bin.postinst: 84: /usr/lib/jvm/java-6-sun-1.6.0.03/bin/java: not found
        dpkg: error processing sun-java6-bin (--configure):
        subprocess post-installation script returned error exit status 127
        Errors were encountered while processing:
        sun-java6-bin
        loslocos@loslocos:~$
        Please help - I need it.

        Comment


          #5
          Re: Java problems

          I would try next.

          sudo apt-get clean
          sudo apt-get update
          sudo apt-get upgrade

          Hopefully this will clean up the package system and you can try to install java again. If not, then I would try.

          dpkg --remove --force-remove-reinstreq "package name"

          I am not an expert, so it would be nice to hear from some of the veterans.
          FKA: tanderson

          Comment


            #6
            Re: Java problems

            Thanks. Some of it worked. The sudo apt-get clean did not do much. I did the update and upgrade but the upgrade exited with errors

            Setting up sun-java6-bin (6-03-0ubuntu2) ...
            /var/lib/dpkg/info/sun-java6-bin.postinst: 84: /usr/lib/jvm/java-6-sun-1.6.0.03/bin/java: not found
            dpkg: error processing sun-java6-bin (--configure):
            subprocess post-installation script returned error exit status 127
            dpkg: dependency problems prevent configuration of sun-java6-plugin:
            sun-java6-plugin depends on sun-java6-bin (= 6-03-0ubuntu2); however:
            Package sun-java6-bin is not configured yet.
            dpkg: error processing sun-java6-plugin (--configure):
            dependency problems - leaving unconfigured
            Errors were encountered while processing:
            sun-java6-bin
            sun-java6-plugin
            E: Sub-process /usr/bin/dpkg returned an error code (1)
            loslocos@loslocos:~$

            I removed the packages using your suggested command (dpkg --remove --force-remove-reinstreq "package name") and I was able to remove
            sun-java6-plugin
            sun-java6-jdk
            sun-java6-jre

            There are still problems with sun-java6-bin. I was not able to remove it;
            loslocos@loslocos:~$ sudo dpkg --remove --force-remove-reinstreq sun-java6-bin
            (Reading database ... 88915 files and directories currently installed.)
            Removing sun-java6-bin ...
            update-binfmts: warning: /var/lib/binfmts/sun-java6 does not exist; nothing to
            do!
            update-binfmts: exiting due to previous errors
            dpkg: error processing sun-java6-bin (--remove):
            subprocess pre-removal script returned error exit status 2
            Errors were encountered while processing:
            sun-java6-bin
            loslocos@loslocos:~$ sudo dpkg --remove --force-remove-reinstreq sun-java6-bin
            dpkg: status database area is locked by another process
            loslocos@loslocos:~$ sudo dpkg --remove --force-remove-reinstreq sun-java6-bin
            (Reading database ... 88915 files and directories currently installed.)
            Removing sun-java6-bin ...
            update-binfmts: warning: /var/lib/binfmts/sun-java6 does not exist; nothing to
            do!
            update-binfmts: exiting due to previous errors
            dpkg: error processing sun-java6-bin (--remove):
            subprocess pre-removal script returned error exit status 2
            Errors were encountered while processing:
            sun-java6-bin
            loslocos@loslocos:~$

            The adept manager shows sun-java6-bin as BROKEN(installed).
            Please help - I need it.

            Comment

            Working...
            X