【gcc 报错】/usr/bin/ld: this linker was not configured to use sysroots

Insert image description here

Solution: Just set the /usr/bin environment variable in front, and the system will first find the ld in this directory.

vim /etc/profile

export PATH=/usr/bin:$PATH

source /etc/profile

おすすめ

転載: blog.csdn.net/u013421629/article/details/132738159