From fe7233fdfb73dc63f3753e6c25795ea8c08a678f Mon Sep 17 00:00:00 2001 From: Robo Date: Thu, 18 Jan 2024 04:26:54 +0900 Subject: [PATCH] fix: avoid using libc as an executable test (#202680) --- resources/server/bin/helpers/check-requirements-linux.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/resources/server/bin/helpers/check-requirements-linux.sh b/resources/server/bin/helpers/check-requirements-linux.sh index 23220930189..b366a190abf 100644 --- a/resources/server/bin/helpers/check-requirements-linux.sh +++ b/resources/server/bin/helpers/check-requirements-linux.sh @@ -81,13 +81,7 @@ if [ -n "$(ldd --version | grep -v musl)" ]; then # Rather than trusting the output of ldd --version (which is not always accurate) # we instead use the version of the cached libc.so.6 file itself. libc_real_path=$(readlink -f "$libc_path") - if [ -x "$libc_real_path" ]; then - # get version from executable - libc_version=$($libc_real_path --version | sed -n 's/.*release version \([0-9]\+\.[0-9]\+\).*/\1/p') - else - # .so is not executable on this host; try getting from strings - libc_version=$(cat "$libc_real_path" | sed -n 's/.*release version \([0-9]\+\.[0-9]\+\).*/\1/p') - fi + libc_version=$(cat "$libc_real_path" | sed -n 's/.*release version \([0-9]\+\.[0-9]\+\).*/\1/p') if [ "$(printf '%s\n' "2.28" "$libc_version" | sort -V | head -n1)" = "2.28" ]; then found_required_glibc=1 else