场景
docker
实际操作
[root@test01v gh_data]# go build --ldflags '-linkmode external -extldflags "-static"'
# gh_data_box/gh_data
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/bin/ld: cannot find -lpthread
/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status

发现缺少包

yum install glibc-static -y
build