【发布时间】:2017-07-22 06:40:43
【问题描述】:
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 引导工具。cmd/dist
使用 /root/.gvm/gos/go1.4 构建 Go 工具链。引导程序/内部/obj 引导/内部/obj/arm 引导/内部/obj/arm64 引导/内部/obj/ppc64 引导程序/内部/obj/x86 引导程序/asm/内部/拱 引导程序/asm/内部/标志 引导程序/asm/内部/lex 引导程序/asm/内部/asm 引导程序/asm 引导/编译/内部/大 引导程序/内部/gcprog 引导/编译/内部/gc 去构建引导程序/编译/内部/gc:/root/.gvm/gos/go1.4/pkg/tool/linux_amd64/6g:信号:杀死 引导程序/链接/内部/ld 引导/链接/内部/amd64 引导/链接/内部/手臂 引导/链接/内部/arm64 引导程序/链接/内部/ppc64 引导/链接/内部/x86 引导程序/链接 go tool dist: FAILED: /root/.gvm/gos/go1.4/bin/go install -v bootstrap/...: exit status 1
【问题讨论】:
-
那么
/root/.gvm/logs/go-go1.5-compile.log中的内容是什么? -
# 使用 /root/.gvm/gos/go1.4 构建 Go 工具链。 boo bootstrap/internal/obj/arm64 bootstrap/internal/obj/ppc64 bootstrap/compile/internal/big bootstrap/internal/gcprog bootstrap/compile/internal/gc go build bootstrap/compile/internal/gc: /root/.gvm/ gos/go1.4/pkg/tool/linux_amd64/6g: 信号: 杀死 bootstrap/link/internal/ld bootstrap/link/internal/amd64 bootstrap/link/internal/arm bootstrap/link/internal/arm64 bootstrap/link/internal /ppc64 bootstrap/link/internal/x86 bootstrap/link go tool dist: FAILED: /root/.gvm/gos/go1.4/bin/go install -v bootstrap/...: exit status 1
-
如您所见,cmets 不是长文本的好地方。编辑您的问题并在其中添加此文本。