openanalytics / shinyproxy

ShinyProxy - Open Source Enterprise Deployment for Shiny and data science apps
https://www.shinyproxy.io
Apache License 2.0
520 stars 152 forks source link

Dependency Error on Amazon Linux 2023: Missing java-17-openjdk-headless Dependency During ShinyProxy 3.1.1 Installation #521

Open yangwu1227 opened 1 month ago

yangwu1227 commented 1 month ago

Description

Thanks for this great tool.

When attempting to install ShinyProxy 3.1.1 on Amazon Linux 2023, I encountered a dependency issue related to java-17-openjdk-headless. Even though java-17-amazon-corretto-headless (which is a build of openjdk; pretty sure they (as in AWS) removed the extra openjdk packages in 2022) is installed and correctly functioning, the RPM package for ShinyProxy fails to recognize it and requires java-17-openjdk-headless.

To reproduce on Amazon Linux 2023

sudo yum install java-17-amazon-corretto-headless -y

export SHINYPROXY_VERSION="3.1.1"
sudo wget https://www.shinyproxy.io/downloads/shinyproxy_${SHINYPROXY_VERSION}_x86_64.rpm
sudo yum localinstall ./shinyproxy_${SHINYPROXY_VERSION}_x86_64.rpm

Expected

ShinyProxy 3.1.1 should install successfully, given that the required version of Java is already installed.

Error

The installation fails with the following error message:

Error: nothing provides java-17-openjdk-headless needed by shinyproxy-3.1.1-1.x86_64 from @commandline

Temporary workaround

The installation can be forced by bypassing the dependency check:

sudo rpm -i --nodeps shinyproxy_3.1.1_x86_64.rpm

This method works but it bypasses the dependency system and may not be ideal.

Environment

openjdk 17.0.12 2024-07-16 LTS
OpenJDK Runtime Environment Corretto-17.0.12.7.1 (build 17.0.12+7-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.12.7.1 (build 17.0.12+7-LTS, mixed mode, sharing)
LEDfan commented 2 weeks ago

Hi, thanks for opening this issue. It seems all RPM based distro use java-17-headless as the common name for the java package, therefore I now changed our package to us this as a dependency. Therefore the RPM package of the next release should just work on amazon linux.