/bin/sh: eval: line 97: ./mybinary not found

I ran into a similar problem and found out what the problem is.

In your stage compile-linux you build the mybinary using the docker image golang. That is Debian based, and because Debian uses the GNU libc, or glibc, mybinary is linked against glibc.

The problem now is that you are using the alpine image in the run job. Alpine doesn’t use glibc, but rather musl libc, and that’s why mybinary can’t find its dependencies.

sh comments this with a rather unhelpful “not found”.

Another solution other than using debian for all jobs would be to use golang:latest-alpine as image.

Hope that helps!

3 Likes