Skip to content

Commit 7b5fe46

Browse files
Copilotabdurriq
andcommitted
Fix SDKMAN GLIBC compatibility for RHEL 8 systems
Co-authored-by: abdurriq <[email protected]>
1 parent 24363aa commit 7b5fe46

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/java/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "java",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"name": "Java (via SDKMAN!)",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/java",
66
"description": "Installs Java, SDKMAN! (if not installed), and needed dependencies.",

src/java/install.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,11 @@ if [ ! -d "${SDKMAN_DIR}" ]; then
297297
usermod -a -G sdkman ${USERNAME}
298298
umask 0002
299299
# Install SDKMAN
300+
# For RHEL 8 systems (glibc 2.28), disable native version to avoid glibc compatibility issues
301+
# SDKMAN native binaries require glibc 2.30+ which is not available in RHEL 8 / AlmaLinux 8 / Rocky 8
302+
if [ "${ADJUSTED_ID}" = "rhel" ] && [ "${MAJOR_VERSION_ID}" = "8" ]; then
303+
export SDKMAN_NATIVE_VERSION="false"
304+
fi
300305
curl -sSL "https://get.sdkman.io?rcupdate=false" | bash
301306
chown -R "${USERNAME}:sdkman" ${SDKMAN_DIR}
302307
find ${SDKMAN_DIR} -type d -print0 | xargs -d '\n' -0 chmod g+s

0 commit comments

Comments
 (0)