Linux Alpine Go镜像中./Configure 和出现cannot find Scrt1.o 等文件
docker官网pull的alpine镜像,是缺少musl-dev包的,这导致了相关glibstdc相关的编译缺少文件,如loadinternal: cannot find runtime/cgo/usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1/usr/lib/gcc/x86_64-alpine-...
·
docker官网pull的alpine镜像,是缺少musl-dev
包的,这导致了相关glibstdc相关的编译缺少文件,如
loadinternal: cannot find runtime/cgo
/usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../x86_64-
alpine-linux-musl/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../x86_64-
alpine-linux-musl/bin/ld: cannot find crti.o: No such file or directory
/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lssp_nonshared
collect2: error: ld returned 1 exit status
解决方案:确保你的Dockerfile包含 musl-dev 包,或者直接运行
apk add --no-cache musl-dev
更多推荐
已为社区贡献1条内容
所有评论(0)