【问题标题】:gvm installation error on debian vpsdebian vps上的gvm安装错误
【发布时间】: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 不是长文本的好地方。编辑您的问题并在其中添加此文本。

标签: linux git bash curl gcc


【解决方案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。有什么重要的吗?

【讨论】:

  • ##### 使用 /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
【解决方案2】:

Aaron,我自己也有同样的烦恼。

如果您收到错误请注意:-bash: gvm: command not found

运行:

来源 /Users/macbook/.gvm/scripts/gvm

您已到达下面的前两行,然后继续其余的:

gvm 安装 go1.4

gvm 使用 go1.4

导出 GOROOT_BOOTSTRAP=$GOROOT

导出 PATH=$PATH:/usr/local/go/bin

PATH=$PATH:$GOPATH/bin

gvm 使用 go1.4

set -x GOROOT_BOOTSTRAP GOROOTset -x GOROOT_BOOTSTRAP GOROOT

然后查看可用的最新版本并安装您想要的版本

gvm 列表

gvm install go1.8.3 -B

gvm 使用 go1.8.3

检查您的版本

gvm 列表

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多