Home >Backend Development >Golang >How to Fix 'Installed Go Binary Not Found in Path' Error in Alpine Linux Docker?
When attempting to execute a Go binary on Alpine Docker, you may encounter the error "Installed Go binary not found in path." This issue stems from a missing dependency caused by compatibility differences between musl and glibc.
To address this issue, perform the following steps:
Run the following command within your Dockerfile:
RUN mkdir /lib64 &&& ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86_64.so.2
This command creates the necessary symlink between the musl and glibc libraries, ensuring compatibility for the Go binary.
After executing these steps, your Go binary should be accessible and executable on Alpine Linux Docker.
The above is the detailed content of How to Fix 'Installed Go Binary Not Found in Path' Error in Alpine Linux Docker?. For more information, please follow other related articles on the PHP Chinese website!