linux - debian vps 上的 gvm 安装错误

标签 linux git bash curl gcc

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/

相关文章:

bash - 如何递归地转到每个文件夹并执行同名的 shell 脚本?

linux - 允许 Docker 缓存 RUN 结果

linux - Bash、Shell、UXTerm 和终端之间的区别

git - 如何将 GIT 存储库保存在 Dropbox 中?

git - 如何强制子树推送覆盖远程更改?

bash - Elixir ——分离的pid

linux - 如何制作一个脚本,在两个参数相似的情况下执行命令 5 分钟?

linux - 像生产服务器一样设置 Vagrant box

Python 2.4 不加载主目录包

git - CI/CD 失败,因为缺少构建所需的文件,但在 .gitignore 中的公共(public)存储库中不需要