我正在开发一个 golang 程序,直到昨天它都工作正常,今天早上我做了一些更改并进行了构建,一切都很好,然后我尝试通过命令行运行该程序,但出现了此消息
k@kM:~/Projects/co-lib$ go run main.go
khaled@khaledM:~/Projects/co-lib$ go run main.go
Command 'go' not found, but can be installed with:
sudo snap install go # version 1.17.3, or
sudo apt install golang-go # version 2:1.13~1ubuntu2
sudo apt install gccgo-go # version 2:1.13~1ubuntu2
See 'snap info go' for additional versions.
Run Code Online (Sandbox Code Playgroud)
然后尝试重新安装它,但是哎呀!我播下这条消息:
[sudo] password for khaled:
error: This revision of snap "go" was published using classic confinement and
thus may perform arbitrary system changes outside of the security
sandbox that snaps are …Run Code Online (Sandbox Code Playgroud)