go - 如何在 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$
解决方案
我认为这很可能与您的 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
您也可以替换ethereum
为ethereum-unstable
开发人员版本。
推荐阅读
- powerbi - 用于频繁更改数据的 DirectQuery 与 Import
- http - Flutter 错误:类型“AddressInfo”不是类型转换中“String”类型的子类型
- python - 优化字典循环求和值
- python-3.x - 如何连接到 API?
- javascript - 显示/隐藏多个元素的过渡
- python - 在 SciPy 中搜索函数 `LinearNDInterpolator` 的源代码
- python - 解析 HTML 页面以获取内容
和标签
- xml - 可以从 CLI 实际运行 xquery 吗?
- django - Docker安装错误的django包
- swift - 当保存在后台异步完成时,我应该如何保证从嵌套上下文中的不同线程获取结果是最新的?