go: cannot find GOROOT directory: /usr/local/go Oct 3, 2022 使用go的时候,出现了错误: go: cannot find GOROOT directory: /usr/local/go 修改文件: vim ~/.bashrc 到/usr/local/go目录下,可以看到根本没有go这个文件夹,那么就是go被卸载了。重新安装,并配置文件(138——140)。 运行:source ~/.bashrc