首页 > 解决方案 > 如何在 go-ethereum 中执行“make-all”命令?

问题描述

我下载了 Go-Ethereum 来开发一个以太坊应用程序来处理虚拟交易以了解加密货币的流动。

现在,我一直在尝试从 go-etherium 目录执行“make all”命令来构建目标文件,但即使我在 .bashrc 文件中正确设置了路径,我仍然遇到错误。我收到错误:make: *** [Makefile:21: all] 错误 1

我应该怎么做才能完成这项工作?

任何帮助,将不胜感激。谢谢

以下是相同的屏幕截图:-

在此处输入图像描述

注意:- 我在这里使用的操作系统是 Ubuntu。

这是文本形式的完整错误:

shashankk@Shashankk:~/go-ethereum$ make all
env GO111MODULE=on go run build/ci.go install
build/ci.go:61:2: cannot find package "github.com/cespare/cp" in any of:
    /usr/local/go/src/github.com/cespare/cp (from $GOROOT)
    /home/shashankk/go/src/github.com/cespare/cp (from $GOPATH)
build/ci.go:62:2: cannot find package "github.com/ethereum/go-ethereum/crypto/signify" in any of:
    /usr/local/go/src/github.com/ethereum/go-ethereum/crypto/signify (from $GOROOT)
    /home/shashankk/go/src/github.com/ethereum/go-ethereum/crypto/signify (from $GOPATH)
build/ci.go:63:2: cannot find package "github.com/ethereum/go-ethereum/internal/build" in any of:
    /usr/local/go/src/github.com/ethereum/go-ethereum/internal/build (from $GOROOT)
    /home/shashankk/go/src/github.com/ethereum/go-ethereum/internal/build (from $GOPATH)
build/ci.go:64:2: cannot find package "github.com/ethereum/go-ethereum/params" in any of:
    /usr/local/go/src/github.com/ethereum/go-ethereum/params (from $GOROOT)
    /home/shashankk/go/src/github.com/ethereum/go-ethereum/params (from $GOPATH)
make: *** [Makefile:21: all] Error 1
shashankk@Shashankk:~/go-ethereum$ 

标签: goubuntumakefileblockchaingo-ethereum

解决方案


我认为这很可能与您的 Golang 环境变量有关,而不是与 go-ethereum 有关,请参阅如何在 Go 中安装要求?“找不到包裹”

除此之外,我只想指出,您还可以通过文档中描述的 Ubuntu 上的 PPA 安装 go- ethereum

sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum

您也可以替换ethereumethereum-unstable开发人员版本。


推荐阅读