Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebrew does not understand Alpine's glibc and ruby versions are already new. #178

Open
gusbemacbe opened this issue Apr 24, 2022 · 4 comments
Labels

Comments

@gusbemacbe
Copy link

Hello!

Regarding the issue Homebrew/brew#8130, published by @naumannt, where we have the same problem (observe he used musl, but I used your glibc), here is my little Docker log:

#44 238.9 Warning: Running in non-interactive mode because `stdin` is not a TTY.
#44 239.0 musl libc (x86_64)
#44 239.0 Version 1.2.3
#44 239.0 Dynamic Program Loader
#44 239.0 Usage: /lib/ld-musl-x86_64.so.1 [options] [--] pathname
#44 239.0 Homebrew requires Ruby 2.6 which was not found on your system.
#44 239.0 Homebrew portable Ruby requires Glibc version 2.13 or newer,
#44 239.0 and your Glibc version is too old. See:
#44 239.0   https://docs.brew.sh/Homebrew-on-Linux#requirements
#44 239.0 Please install Ruby 2.6 and add its location to your PATH.

I checked that Ruby version is 3.1.0, that is already newer than 2.6. I also checked glibc version, the same version you updated on your repository.

I also manipulated with the following code, based on @prantlf's docker-alpine-glibc:

sudo ln -sfn /usr/glibc-compat/lib/ld-linux-x86-64.so.2 /usr/glibc-compat/lib/ld-linux-x86-64.so && \
sudo ln -sfn /usr/glibc-compat/lib/libBrokenLocale.so.1 /usr/glibc-compat/lib/libBrokenLocale.so && \
sudo ln -sfn /usr/glibc-compat/lib/libanl.so.1 /usr/glibc-compat/lib/libanl.so && \
sudo ln -sfn /usr/glibc-compat/lib/libc_malloc_debug.so.0 /usr/glibc-compat/lib/libc_malloc_debug.so && \
sudo ln -sfn /usr/glibc-compat/lib/libcrypt.so.1 /usr/glibc-compat/lib/libcrypt.so && \
sudo ln -sfn /usr/glibc-compat/lib/libdl.so.2 /usr/glibc-compat/lib/libdl.so && \
sudo ln -sfn /usr/glibc-compat/lib/libmvec.so.1 /usr/glibc-compat/lib/libmvec.so && \
sudo ln -sfn /usr/glibc-compat/lib/libnsl.so.1 /usr/glibc-compat/lib/libnsl.so && \
sudo ln -sfn /usr/glibc-compat/lib/libnss_compat.so.2 /usr/glibc-compat/lib/libnss_compat.so && \
sudo ln -sfn /usr/glibc-compat/lib/libnss_db.so.2 /usr/glibc-compat/lib/libnss_db.so && \
sudo ln -sfn /usr/glibc-compat/lib/libnss_dns.so.2 /usr/glibc-compat/lib/libnss_dns.so && \
sudo ln -sfn /usr/glibc-compat/lib/libnss_files.so.2 /usr/glibc-compat/lib/libnss_files.so && \
sudo ln -sfn /usr/glibc-compat/lib/libnss_hesiod.so.2 /usr/glibc-compat/lib/libnss_hesiod.so && \
sudo ln -sfn /usr/glibc-compat/lib/libpthread.so.0 /usr/glibc-compat/lib/libpthread.so && \
sudo ln -sfn /usr/glibc-compat/lib/libresolv.so.2 /usr/glibc-compat/lib/libresolv.so && \
sudo ln -sfn /usr/glibc-compat/lib/librt.so.1 /usr/glibc-compat/lib/librt.so && \
sudo ln -sfn /usr/glibc-compat/lib/libthread_db.so.1 /usr/glibc-compat/lib/libthread_db.so && \
sudo ln -sfn /usr/glibc-compat/lib/libutil.so.1 /usr/glibc-compat/lib/libutil.so

sudo sed -i 's#/usr/bin/bash#/bin/sh#' /usr/glibc-compat/bin/ldd && \
sudo sed -i 's#/usr/bin/bash#/bin/sh#' /usr/glibc-compat/bin/sotruss && \
sudo sed -i 's#/usr/bin/bash#/bin/sh#' /usr/glibc-compat/bin/tzselect && \
sudo sed -i 's#/usr/bin/bash#/bin/sh#' /usr/glibc-compat/bin/xtrace

But unsuccessfully.

@jonchang closed the issue as he said there were not maintainers interested in analysing this issue as they do not use Alpine Linux.

@prantlf
Copy link

prantlf commented Apr 25, 2022

You could run brew with strace to see what call failed before the complaint about too old Ruby and Glibc was printed.

@gusbemacbe
Copy link
Author

You could run brew with strace to see what call failed before the complaint about too old Ruby and Glibc was printed.

@prantlf, I couldn't run brew, as Homebrew isn't installed. I was trying to install Homebrew and received that versions errors.

@sgerrand
Copy link
Owner

Sorry for the late reply. Would you please provide a minimal Dockerfile that demonstrates this problem. Without that I cannot investigate this error further for you.

@agustinuslaw
Copy link

I have the same problem.

~ $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
environment: line 453: ldd: command not found
Homebrew requires Ruby 2.6 which was not found on your system.
Homebrew portable Ruby requires Glibc version 2.13 or newer,
and your Glibc version is too old. See:
  https://docs.brew.sh/Homebrew-on-Linux#requirements
Please install Ruby 2.6 and add its location to your PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants