Replies: 2 comments
-
I found a workaround by inserting this command at the beginning of the script. But the downside is that it will also ignore any other errors silently
|
Beta Was this translation helpful? Give feedback.
0 replies
-
For me - this setup script was a solution: set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
# Here we are making sure the target dir exists and nothing is in the way
mkdir -p /etc/ssl/certs/java
rm -f /etc/ssl/certs/java/cacerts # remove empty file or dangling symlink if present
# Install JRE (exactly JRE) + cert packages but without triggers
apt-get update -qq
apt-get -yqq --no-install-recommends -o Dpkg::Options::=--no-triggers install openjdk-21-jre-headless ca-certificates ca-certificates-java
# Now trigger only Java cert to generate /etc/ssl/certs/java/cacerts
dpkg --triggers-only ca-certificates-java || true
# And just in fact - repeat the same, but from other side 😄
update-ca-certificates -f
# This item feels like optional, but still - ensure $JAVA_HOME sees that keystore path via symlink
# As I understand on Ubuntu OpenJDK this symlink may not exists until packages wiring it up.
if command -v java >/dev/null 2>&1; then
SYS_JAVA_HOME="$(dirname "$(dirname "$(readlink -f "$(command -v java)")")")"
if [ -d "$SYS_JAVA_HOME/lib/security" ] && [ ! -e "$SYS_JAVA_HOME/lib/security/cacerts" ]; then
ln -s /etc/ssl/certs/java/cacerts "$SYS_JAVA_HOME/lib/security/cacerts" || true
fi
fi
# Verify the keystore is real now (should list many entries)
keytool -list -keystore /etc/ssl/certs/java/cacerts -storepass changeit | head -n 5 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
my setup.sh script contains the installation of the OpenJDK Java JRE in combination with the ca-certificates.
However I get this error as part of the post installation script, which unfortunately makes the environment setup fail.
This ca-certificates-java is part of the dependencies for the CUDA toolkit 12.6 by nVidia, which is a required dependency for my current project.
Any way to make this installation succeed, or at least ignore the error and continue?
Beta Was this translation helpful? Give feedback.
All reactions