Cannot install apps after attempted java install (SOLVED)

For issues with MX that has been modified from the initial install. Example: adding packages that then cause issues.
Post Reply
Message
Author
joegum
Posts: 32
Joined: Thu Jul 30, 2015 2:12 am

Cannot install apps after attempted java install (SOLVED)

#1 Post by joegum »

Hi,

There is an app i want to try that requires Oracle's Java. I went to Oracle's site and saw they no longer have a .deb version. I downloaded the .rpm version and used alien --scripts to convert it to a .deb. After that, i used GDebi to install it.

The install failed. I did not take notes as to why because i just assumed the package did not install and that was that.

There is an old VirtualBox Windows XP image on my HD. I decided to just try the java app in a virtual machine.

However, Synaptic will not let me install VirtualBox because of errors from the attempted java install. It attempts to remove java, but returns error messages. So, the installation of any other software also fails.

I tried Fix Broken Packages with no luck.

Edit: I tried Reinstall with GDebi and Gdebi complains that the package is already installed. But, GDebi cannot remove it.

When I try various commands like:
root@mx0:~# update-alternatives --display java
java - auto mode
link currently points to /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java - priority 1071
slave java.1.gz: /usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/java.1.gz
Current 'best' version is '/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java'.
root@mx0:~# java -version
java version "1.7.0_111"
OpenJDK Runtime Environment (IcedTea 2.6.7) (7u111-2.6.7-1~deb8u1)
OpenJDK 64-Bit Server VM (build 24.111-b01, mixed mode)
root@mx0:~# which javaws
/usr/bin/javaws

it doesn't seem to show Oracle's java is installed.

I tried apt-get update, the apt-get upgrade. After it prompted me to remove java, this is the output:
...
1 not fully installed or removed.
After this operation, 129 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 226522 files and directories currently installed.)
Removing jre1.8.0-102 (1.8.0102-1) ...
find: `/usr/java/*': No such file or directory
/var/lib/dpkg/info/jre1.8.0-102.postrm: line 586: /usr/sbin/alternatives: No such file or directory
dpkg: error processing package jre1.8.0-102 (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
jre1.8.0-102
E: Sub-process /usr/bin/dpkg returned an error code (1)

I don't really care if a few little bits of Oracle's Java are floating around my OS. They're probably harmless.

Is there a way to get Synaptic and apt-get to just ignore them? Otherwise, I won't be able to update my system anymore. A total reinstall will be necessary.

Or at this point, is a clean reinstall and starting over from scratch the best option?

This is MX-15 Modified using TDE. 64-bit.

Thanks :)

Edit: After searching some more, I tried this:
root@mx0:~# rm /var/cache/debconf/* as suggested here: http://askubuntu.com/questions/214081/d ... -trying-to
Last edited by joegum on Wed Oct 05, 2016 6:11 am, edited 1 time in total.

joegum
Posts: 32
Joined: Thu Jul 30, 2015 2:12 am

Re: Cannot install apps after attempted java install

#2 Post by joegum »

I eventually found a solution. I would have deleted this post. But I see other folks have already looked at it. So, they may also be curious as to the solution, too.

I followed the instructions here: http://wikitechsolutions.com/9993/error-127-in-synaptic

Step 2 did it.
tdesu konqueror
Go to /var/lib/dpkg/info
Manually delete all the files related to the jre install.
Reload synaptic.

After this, synaptic seems to be behaving normally.

Thanks.

User avatar
Stevo
Developer
Posts: 12838
Joined: Fri Dec 15, 2006 8:07 pm

Re: Cannot install apps after attempted java install (SOLVED)

#3 Post by Stevo »

Galternatives works pretty well for a GUI in setting alternatives, but manually installed stuff won't appear in the alternatives system by themselves, unless they have a very clever installation script. There was a package you could add for the older MEPIS releases that would go out and get Oracle's Java, then install and set it up correctly, but I don't know if it's still working: http://www.duinsoft.nl/packages.php

I'm assuming that whatever you have doesn't work with the open Java 8 that's in Debian's Jessie repository, even after the alternatives are set to prefer that version?

joegum
Posts: 32
Joined: Thu Jul 30, 2015 2:12 am

Re: Cannot install apps after attempted java install (SOLVED)

#4 Post by joegum »

I wanted to try http://www.pianoworld.com/forum/ubbthre ... ost2575562

Now there is an updated version here: http://www.pianoworld.com/forum/ubbthre ... tml#UNREAD

I'm doing some important stuff on my PC right now. So, i don't want to risk messing things up permanently.

I'll just try this virtualized in XP.

Thanks Stevo.
-Joe

User avatar
timkb4cq
Developer
Posts: 3205
Joined: Wed Jul 12, 2006 4:05 pm

Re: Cannot install apps after attempted java install (SOLVED)

#5 Post by timkb4cq »

I installed openjdk-8-jre and galternatives with Synaptic, used galternatives to set openjdk-8 to be the default java, and Temperament_Tuner runs just fine. Can't test it properly because I don't have a piano, but I get the GUI with no errors and the buttons appear to work.

I'm pretty sure you don't need Oracle Java for this one.
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

User avatar
Malanrich
Posts: 45
Joined: Sat Mar 31, 2007 2:28 am

Re: Cannot install apps after attempted java install (SOLVED)

#6 Post by Malanrich »

Stevo wrote:... There was a package you could add for the older MEPIS releases that would go out and get Oracle's Java, then install and set it up correctly, but I don't know if it's still working: http://www.duinsoft.nl/packages.php
Oh man. I just tried out the link on my install of MX and it worked perfectly. This solves a Java mess I've been struggling with for weeks. I could just kiss somebody...

[Update: Fixed the problem also on my vintage install of antiX.]

User avatar
kmathern
Developer
Posts: 2408
Joined: Wed Jul 12, 2006 2:26 pm

Re: Cannot install apps after attempted java install (SOLVED)

#7 Post by kmathern »

timkb4cq wrote:I installed openjdk-8-jre and galternatives with Synaptic, used galternatives to set openjdk-8 to be the default java, and Temperament_Tuner runs just fine. Can't test it properly because I don't have a piano, but I get the GUI with no errors and the buttons appear to work.

I'm pretty sure you don't need Oracle Java for this one.
I need Oracle Java for a java app I use, with openjdk-8 it throws this error:
openjdk-8-error.png
I use the make-jpkg script which is installed by java-package.
It creates a .deb package (i.e., oracle-java8-jre_8u101_amd64.deb) from the tar.gz tarball download.



edit: just found out that installing openjfx fixes the 'Missing JavaFX' error I've been getting with openjdk-8

joegum
Posts: 32
Joined: Thu Jul 30, 2015 2:12 am

Re: Cannot install apps after attempted java install (SOLVED)

#8 Post by joegum »

Thanks for the help everyone! The MX/Mepis forums are the friendliest and most helpful forums I have ever come across since I started using Linux. You folks really are the best!

I'm using Trinity Desktop Environment which is preventing the software from working under Linux.

TDE has audio issues on MX-15: http://forum.mepiscommunity.org/viewtop ... 00&t=40197

Here are the errors:
joegumbo@mx0:~
$ !465
java -jar /home/joegumbo/Downloads/HBTuner_V11.jar
Exception in thread "main" javax.sound.sampled.LineUnavailableException
at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openImpl(PulseAudioMixer.java:714)
at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openLocal(PulseAudioMixer.java:588)
at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openLocal(PulseAudioMixer.java:584)
at org.classpath.icedtea.pulseaudio.PulseAudioMixer.open(PulseAudioMixer.java:579)
at org.classpath.icedtea.pulseaudio.PulseAudioDataLine.open(PulseAudioDataLine.java:94)
at org.classpath.icedtea.pulseaudio.PulseAudioTargetDataLine.open(PulseAudioTargetDataLine.java:111)
at Hbtuner.main(Unknown Source)
joegumbo@mx0:~
$

So even if I try to run HB-Tuner virtualized in XP on this Linux PC, it's probably still going to give me problems.

That's OK. i much prefer TDE even if I do come up against the occasional limitation.

Thanks!
-Joe :)

Edit: Btw, i posted a link to this discussion on the PW thread so the developer can follow this conversation if he wants.

Post Reply

Return to “MX Modified”