You are not logged in.

#1 2018-10-01 22:35:57

jimjamz
Member
From: Nagasaki, Japan
Registered: 2016-04-04
Posts: 189

[SOLVED] OpenJDK Dependencies not being recognised in BunsenLabs LIVE

In Bunsen LIVE, I want to install an application packaged within a .deb
The package requires Java SE 6 or 7 (at least):

sudo dpkg -i myApplication.deb
 myApplication depends on libgtk2.0-dev; however:
  Package libgtk2.0-dev is not installed.
 myApplication depends on openjdk-6-jre | openjdk-6-jdk | openjdk-7-jre | openjdk-7-jdk | oracle-java6-set-default | oracle-java6-install | oracle-java7-set-default | oracle-java7-install; however:
  Package openjdk-6-jre is not installed.
  Package openjdk-6-jdk is not installed.
  Package openjdk-7-jre is not installed.
  Package openjdk-7-jdk is not installed.
  Package oracle-java6-set-default is not installed.
  Package oracle-java6-install is not installed.
  Package oracle-java7-set-default is not installed.
  Package oracle-java7-install is not installed.

 
A similar error is also displayed when opening the .deb in the GUI.
 
I installed libgtk2.0-de:

sudo apt-get install libgtk2.0-dev

This works fine, as I am no longer asked for this from here on in.

To be on the safe side, I used openjdk-7-jre specifically as that is what is required.  I am not sure on openjdk-8-jre's backwards support.
openjdk-7-jre is no longer available in the Bunsenlabs LIVE APT repository.
So, I downloaded the latest openjdk-7-jre from:
https://download.java.net/openjdk/jdk7u … 014.tar.gz

And extracted:

sudo tar -zxvf openjdk-7u75-b13-linux-x64-18_dec_2014.tar.gz -C /opt/

Made the JRE default:

sudo update-alternatives --install /usr/bin/java java /opt/java-se-7u75-ri/bin/java 2
sudo update-alternatives --config java

Configured the environment variables in ~/.bashrc:

export JAVA_HOME=/opt/java-se-7u75-ri
export JRE_HOME=/opt/java-se-7u75-ri/bin/java
export PATH=$PATH:$JAVA_HOME:$JRE_HOME

Tested it is configured correctly in a new terminal window:

user@debian:~$ java -version
openjdk version "1.7.0_75"
OpenJDK Runtime Environment (build 1.7.0_75-b13)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

However, when running the .deb installer again, it *still* asks for most of the above Java dependencies:

dpkg: dependency problems prevent configuration of myApplication:
 myApplication depends on openjdk-6-jre | openjdk-6-jdk | openjdk-7-jre | openjdk-7-jdk | oracle-java6-set-default | oracle-java6-install | oracle-java7-set-default | oracle-java7-install; however:
  Package openjdk-6-jre is not installed.
  Package openjdk-6-jdk is not installed.
  Package openjdk-7-jre is not installed.
  Package openjdk-7-jdk is not installed.
  Package oracle-java6-set-default is not installed.
  Package oracle-java6-install is not installed.
  Package oracle-java7-set-default is not installed.
  Package oracle-java7-install is not installed.

But openjdk-7-jre *is* installed.

Last edited by jimjamz (2018-10-10 04:35:47)

Offline

#2 2018-10-01 23:16:33

nobody
The Great
Registered: 2015-08-10
Posts: 3,655

Re: [SOLVED] OpenJDK Dependencies not being recognised in BunsenLabs LIVE

JDK 7 is installed outside of the package manager, which leads to the package manager not knowing about it.

If you don't want to tell us which application this is that's fine, so not knowing the details, I suggest you go 'all in' and install the application as a package-manager external thing too.

For this, we just extract the .deb file and install the files contained therein to their right places. If the package ships complex packaging scripts though, what they do is lost (and perhaps needs to be replicated manually):

Extract the .deb like so:

dpkg-deb -x thedeb.deb somedirectory

In somedirectory, you'll find the extracted contents. Install them to a location like /usr/local/ (or /opt/yourapplication, whatever the package is structured like) using cp/install/mv.

Offline

#3 2018-10-01 23:52:21

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,668
Website

Re: [SOLVED] OpenJDK Dependencies not being recognised in BunsenLabs LIVE

BTW Bunsenlabs' repositories provide only our special bunsen-* packages, and a very small number of backported packages.

Everything else comes from the standard Debian repositories, so if you check the package search https://www.debian.org/distrib/packages#search_packages you'll find what's available for Debian Stretch (only openjdk-8-jre).


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#4 2018-10-02 04:47:52

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: [SOLVED] OpenJDK Dependencies not being recognised in BunsenLabs LIVE

it is possible to tell apt and/or dpkg to ignore dependencies.
not sure what the implications would be in the long run though (constantly having a package with unfulfilled dependencies installed).

Offline

#5 2018-10-02 15:33:58

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,901

Re: [SOLVED] OpenJDK Dependencies not being recognised in BunsenLabs LIVE

ohnonot wrote:

it is possible to tell apt and/or dpkg to ignore dependencies.
not sure what the implications would be in the long run though (constantly having a package with unfulfilled dependencies installed).

Apt might complain such packages installed without deps to be broken and ask if you want to fix them.


Real Men Use Linux

Offline

#6 2018-10-10 04:34:58

jimjamz
Member
From: Nagasaki, Japan
Registered: 2016-04-04
Posts: 189

Re: [SOLVED] OpenJDK Dependencies not being recognised in BunsenLabs LIVE

@nobody - the `deb - x` command did the trick.  I was able simply extract the package and run the binary contained within it without any extra installation/configuration.  Ultimately, I learned that the application specifically required Oracle's Java SE 7 JRE and would not recognise the OpenJDK 7 JRE binary.  This became apparent when trying to run the extracted application.  I suspect that the same verification could have been implemented on the package constraints.

Offline

#7 2018-10-10 14:04:16

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,901

Re: [SOLVED] OpenJDK Dependencies not being recognised in BunsenLabs LIVE

The application may be looking at the path where it believes the Oracle JDK/JRE is at. Maybe a symlink to “fake”  the app to use the OpenJDK?


Real Men Use Linux

Offline

#8 2018-10-10 21:55:55

stevep
MX Linux Developer
Registered: 2016-08-08
Posts: 381

Re: [SOLVED] OpenJDK Dependencies not being recognised in BunsenLabs LIVE

Java is supposed to be backwards-compatible, too.  Java 7 might not be getting the security updates that the newer versions do, so I'd experiment to see if you can get it to work with at least 8.

Offline

Board footer

Powered by FluxBB