reason:
reason:
Most linux software is connected with glibc, GNU libc Library (libc provides standard C library and POSIX API).
Most Linux distributions are based on glibc.
Alpine Linux is based on the musl libc library, which is a minimal implementation and strictly follows POSIX.
For example, executable files built on glibc distribution depend on/lib/x86_ 64 Linux GNU/libc. So. 6, which cannot be used on Alpine (except for static links).
resolvent:
Method 1: install the libc6 compatible package: APK add libc6 compat. This wrapper provides a lightweight glibc compatible layer. For simple applications, that’s enough.
Method 2, install the appropriate glibc on alpine, and provide all glibc methods and functions. Alpine can be built using glibc and should be installed in the following programs (for example):
# Source: https://github.com/anapsix/docker-alpine-java
ENV GLIBC_REPO=https://github.com/sgerrand/alpine-pkg-glibc
ENV GLIBC_VERSION=2.30-r0
RUN set -ex && \
apk --update add libstdc++ curl ca-certificates && \
for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION}; \
do curl -sSL ${GLIBC_REPO}/releases/download/${GLIBC_VERSION}/${pkg}.apk -o /tmp/${pkg}.apk; done && \
apk add --allow-untrusted /tmp/*.apk && \
rm -v /tmp/*.apk && \
/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib
Method 3, using statically linked executable files. The static executable does not have dynamic dependencies and can run on any Linux.
Method 4, the software execution file can be built on alpine
div>
Read More:
- Linux error deletion libc.so.6 how to recover
- not found libc++.so
- Linux use ls to view the file color is all white solution, and Linux file color introduction
- Code::Blocks 12.11 error: ‘nullptr’ was not declared in this scope&GNU GCC -std=gnu++0x
- Executable file not found in $path bug solution
- launch failed.Binary Not found in Linux / Ubuntu solution
- Add executable permissions to Linux files
- How to solve the problem of error 15: file not found when Linux starts
- Linux basic command execution error: the solution of command not found
- Linux remote copy command and not a regular file solution
- Solution to the error $’\ R’: command not found when executing shell script under Linux
- Linux rhel7/centos7 source code compilation and installation Emacs Error NO x toolkit could be found
- Extracting the first X lines of a file with Linux
- Debugging failed under vscode Ubuntu, unable to open libc-start. C raise. C, etc
- standard_init_linux.go:178: exec user process caused “no such file or directory”
- Linux getsockopt SO_ERROR values (errno.h)
- Error: pg_config executable not found.
- Linux uses open source Yum to report error performing checksums
- Apache Groovy——java.lang.NoSuchMethodError: x.x.x: method <init>()V not found
- FTP prompt in Linux — 553 could not create file (absolutely useful)