Reputation: 75
I have some stack problems when installing JDK jdk_1.8.005-1_i386.deb on Linux Mint 16 Cinamons petra. I tried with alien -i jdk-8u5-linux-i586.rpm
and direct install with
jdk_1.8.005-1_i386.deb I still get this error on my console:
(Reading database ... 152427 files and directories currently installed.)
Unpacking jdk (from .../jdk_1.8.005-1_i386.deb) ...
dpkg: error processing /home/dejjan/Downloads/jdk_1.8.005-1_i386.deb (--install):
trying to overwrite '/etc/.java/.systemPrefs/.system.lock', which is also in package jre 1.7.055-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/home/dejjan/Downloads/jdk_1.8.005-1_i386.deb
How can I solve this?
Upvotes: 1
Views: 2272
Reputation: 2519
I basically never use the deb file for that matter. From experience it is easier to use the archieve version(tgz).
Download and extract the tgz under /usr/java, then:
sudo ln -sf /usr/java/jdk1.8-version/ /usr/java/default #so that you can change easily the java version in the future
sudo rm /usr/bin/java /usr/bin/javac /usr/bin/jar
Create symbolic links to java executables
sudo ln -sf /usr/java/default/bin/java /usr/bin/java
sudo ln -sf /usr/java/default/bin/javac /usr/bin/javac
sudo ln -sf /usr/java/default/bin/jar /usr/bin/jar
define a global JAVA_HOME
sudo bash -l -c "echo export JAVA_HOME=/usr/java/default >> /etc/profile"
finally let mint know which java to use
sudo update-alternatives --config java
and select the right version from a list
Upvotes: 2
Reputation: 5835
The problem is in the error message:
trying to overwrite '/etc/.java/.systemPrefs/.system.lock', which is also in package jre 1.7.055-1
Remove your current JDK before installing the new one.
Upvotes: 0