oracle-java8-jdk instllation have unmet dependencies

Asked by Sharanappa

Below package debian created with 'java-package' utility, while trying to install it on target machine, getting below errors:

root@mysys-1:~# apt install ./oracle-java8-jdk_8u411_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'oracle-java8-jdk' instead of './oracle-java8-jdk_8u411_amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 oracle-java8-jdk : Depends: libgl1-mesa-glx but it is not installable or
                             libgl1 but it is not installable
                    Depends: libgtk-3-0 (>= 3.0.0) but it is not installable
                    Depends: libxxf86vm1 but it is not installable
E: Unable to correct problems, you have held broken packages.
root@mysis-1:~#

I see DEBIAN/control contains depends atrribute on 'java-package' version 0.61 which does not exist in previous versions.

Depends: java-common, libasound2 (>= 1.0.16), libatk1.0-0 (>= 1.12.4), libc6 (>= 2.12), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.10.0), libfontconfig1 (>= 2.11.94), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.2), libgdk-pixbuf2.0-0 (>= 2.22.0), libgl1-mesa-glx | libgl1, libglib2.0-0 (>= 2.20.0), libgtk-3-0 (>= 3.0.0), libgtk2.0-0 (>= 2.24.0), libpango-1.0-0 (>= 1.22.0), libpangocairo-1.0-0 (>= 1.14.0), libpangoft2-1.0-0 (>= 1.14.0), libx11-6, libxext6, libxi6, libxrender1, libxtst6, libxxf86vm1

my question is:
1) why 'Depends' attributed added in newer version of 'java-package' ?
2) what's impact if 'depends' attributes were removed while building the package ?
3) how to resolve above dependency errors ?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Which Ubuntu release are you running (both on the machine where you create the *.deb file and on the target machine)?
Which version of java-package did you use?
Which options and parameters did you use for the make-jpkg command?

What is the output of the commands (to be executed in a terminal window, both on the machine where you create the *.deb file and on the target machine)?

uname -a
lsb_release -crid
apt policy libgl1-mesa-glx libgl1 libgtk-3-0 libxxf86vm1
apt --simulate install libgl1 libgtk-3-0 libxxf86vm1

Revision history for this message
Sharanappa (sharan2024) said :
#2

ubuntu@dc2vp1-fuelhost:~$ dpkg -l | grep java-package
ii java-package 0.62 all Utility for creating Java Debian packages

ubuntu@dc2vp1-fuelhost:/tmp$ make-jpkg jdk-8u411-linux-x64.tar.gz

----------------------------
source machine:
----------------------------
ubuntu@dc2vp1-fuelhost:/tmp$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.7 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.7 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

ubuntu@dc2vp1-fuelhost:~$ uname -a
Linux dc2vp1-fuelhost 4.15.0-112-generic #113~16.04.1-Ubuntu SMP Fri Jul 10 04:37:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

ubuntu@dc2vp1-fuelhost:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial

ubuntu@dc2vp1-fuelhost:~$ apt policy libgl1-mesa-glx libgl1 libgtk-3-0 libxxf86vm1
libgl1-mesa-glx:
  Installed: 18.0.5-0ubuntu0~16.04.1
  Candidate: 18.0.5-0ubuntu0~16.04.1
  Version table:
 *** 18.0.5-0ubuntu0~16.04.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     11.2.0-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libgl1:
  Installed: (none)
  Candidate: (none)
  Version table:
libgtk-3-0:
  Installed: 3.18.9-1ubuntu3.3
  Candidate: 3.18.9-1ubuntu3.3
  Version table:
 *** 3.18.9-1ubuntu3.3 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.18.9-1ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libxxf86vm1:
  Installed: 1:1.1.4-1
  Candidate: 1:1.1.4-1
  Version table:
 *** 1:1.1.4-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

ubuntu@dc2vp1-fuelhost:~$ apt --simulate install libgl1 libgtk-3-0 libxxf86vm1
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libgl1-mesa-glx' instead of 'libgl1'
libxxf86vm1 is already the newest version (1:1.1.4-1).
libxxf86vm1 set to manually installed.
libgl1-mesa-glx is already the newest version (18.0.5-0ubuntu0~16.04.1).
libgl1-mesa-glx set to manually installed.
libgtk-3-0 is already the newest version (3.18.9-1ubuntu3.3).
libgtk-3-0 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 125 not upgraded.
ubuntu@dc2vp1-fuelhost:~$

----------------------------
target machine:
----------------------------
root@mysys-2:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.7 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.7 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
root@mysis-2:~#

root@mysys-2:~# uname -a
Linux mysys-2.domain.tld 4.15.0-162-generic #170~16.04.1-Ubuntu SMP Tue Oct 26 08:03:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

root@cic-2:~# lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial

root@mysys-2:~# apt policy libgl1-mesa-glx libgl1 libgtk-3-0 libxxf86vm1
N: Unable to locate package libgl1-mesa-glx
N: Unable to locate package libgl1
N: Unable to locate package libgtk-3-0
N: Unable to locate package libxxf86vm1

root@cic-2:~# apt --simulate install libgl1 libgtk-3-0 libxxf86vm1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libgl1
E: Unable to locate package libgtk-3-0
E: Unable to locate package libxxf86vm1

----------------------------

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

It seems that the package management system on the target machine is not correctly set up.

What output do you receive on the target machine for the command

sudo apt update

Revision history for this message
Sharanappa (sharan2024) said :
#4

target machine is our product which contains repository of ubuntu packages. so above mentioned dependency packages do not exist here :

I tried to comment 'Depends:' line from below file and rebuilt the package, installation got succeeded on target machine.

/usr/share/java-package$ sudo vi oracle-jdk.sh
Package: $j2se_package
Architecture: $j2se_debian_arch
#Depends: \${misc:Depends}, java-common, $depends
Recommends: netbase

this 'Depends:' attribute does not exist in previous versions (0.53) of 'java-package' utility, so installation was fine.

1) Any reason why 'Depends:' attribute got introduced in newer versions of 'java-package' ?
2) what's impact if above 'Depends:' line is commented/removed to inline with previous versions?
3) how to resolve dependency errors if #2 is not recommended ?

Revision history for this message
Best Manfred Hampl (m-hampl) said (last edit ):
#5

If the target machine does not have access to the Ubuntu repositories, then this is an unsupported set-up outside the scope of Ubuntu support and this Ubuntu question area.

Furthermore support for Ubuntu 16.04 has already ended three years ago (except for Expanded Security Maintenance with Ubuntu Pro).

Nevertheless answers to your questions:
1) The versions numbers of the java-package package do not contain the string "ubuntu". This means that the packages were copied from Debian without Ubuntu-specific modification. If you have specific questions to the contents of such package (or the difference between two versions), then you better ask Debian.
2) If running an executable file from within the oracle-java8-jdk_*.deb file needs a library from the list of packages in "Depends", and if that library is not available, then the program will most probably crash.
3) Install the packages that are missing.

Revision history for this message
Sharanappa (sharan2024) said :
#6

thanks @m-hampl for quick answers/support on this.

We will approach to install dependencies on target machine which is mandated by 'java-package' utility.

For now accepting and closing this bug.

Revision history for this message
Sharanappa (sharan2024) said :
#7

Thanks Manfred Hampl, that solved my question.

Revision history for this message
zobijack (zobijack) said :
#8

thanx for your support Any reason why 'Depends:' attribute got introduced in newer versions of 'java-package' ?

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

@zobijack:
Already answered in comment #5:
As far as I can see, this change has been done by the Debian developers. Please ask there.
Ubuntu just has copied the package without own modification.