root@Aaron:~# sudo apt-get install curl git mercurial make binutils bison gcc build-essential -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
binutils is already the newest version.
bison is already the newest version.
build-essential is already the newest version.
curl is already the newest version.
gcc is already the newest version.
make is already the newest version.
mercurial is already the newest version.
git is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root@Aaron:~# bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
ERROR: Already installed!
root@Aaron:~# gvm install go1.4
Already installed!
root@Aaron:~# gvm use go1.4 [--default]
Now using version go1.4
root@Aaron:~# gvm install go1.4 -B
Already installed!
root@Aaron:~# gvm use go1.4
Now using version go1.4
root@Aaron:~# export GOROOT_BOOTSTRAP=$GOROOT
root@Aaron:~# gvm install go1.5
Installing go1.5...
* Compiling...
ERROR: Failed to compile. Check the logs at /root/.gvm/logs/go-go1.5-compile.log
ERROR: Failed to use installed version
我曾多次尝试在三个不同的 Linux vps 上执行此操作,但它们都给出了相同的错误。我当前的go版本是go1.4 linux/amd64。我尝试过重新安装,但还是没用。
编译日志的输出是
构建 Go 引导工具。命令/距离
使用/root/.gvm/gos/go1.4 构建 Go 工具链。Bootstrap /内部/obj Bootstrap /内部/obj/arm Bootstrap /内部/obj/arm64 Bootstrap /内部/obj/ppc64 Bootstrap /内部/obj/x86 Bootstrap /asm/内部/arch Bootstrap /asm/内部/标志 Bootstrap /asm/内部/lex Bootstrap /asm/内部/asm Bootstrap /汇编语言 引导/编译/内部/大 Bootstrap /内部/gcprog 引导/编译/内部/gc go build bootstrap/compile/internal/gc:/root/.gvm/gos/go1.4/pkg/tool/linux_amd64/6g: 信号: 被杀死 Bootstrap /链接/内部/ld Bootstrap /链接/内部/amd64 引导/链接/内部/ ARM Bootstrap /链接/内部/arm64 Bootstrap /链接/内部/ppc64 Bootstrap /链接/内部/x86 Bootstrap /链接 go tool dist:失败:/root/.gvm/gos/go1.4/bin/go install -v bootstrap/...:退出状态1
最佳答案
这行看起来很奇怪:
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
尝试:
bash <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
请注意,通过这样做,您信任 moovweb
执行他们在该脚本中放入的任何指令。
如果这不起作用,该命令会告诉您查看 /root/.gvm/logs/go-go1.5-compile.log
。有什么重要的事情吗?
关于linux - debian vps 上的 gvm 安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45251555/