gcc -static 在centos stream8 和centos stream9中运行报错的解决办法:

/usr/bin/ld: cannot find -lc

我们下载glibc-static:

gcc -static 在centos stream8 和centos stream9中运行报错的解决办法-LMLPHP

gcc -static 在centos stream8 和centos stream9中运行报错的解决办法-LMLPHP

选择x86_64的。

还有一个是libxcrypt-static,依旧在这个网站里搜。

rpm -ivh glibc-static-2.28-239.el8.x86_64.rpm libxcrypt-static-4.1.1-6.el8.x86_64.rpm

两个文件同时写上!!! 

11-05 07:40