go build gcc报错 /usr/bin/ld | cannot find -ldl cannot find -lpthread cannot find -lc

之前一直在kali或者其他ubuntu设备编译sliver, 临时在centos7上编译时报错了

# github.com/bishopfox/sliver/server
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -ldl
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status

查了下资料,引用(https://www.xiaobinqt.cn/build-running-gcc-failed/)解决方案;

yum install glibc-static.x86_64 -y
posted @ 2023-04-13 16:05  干炸小黄鱼  阅读(194)  评论(0编辑  收藏  举报