ubuntu - 如何在 Ubuntu 上安装 web3?

标签 ubuntu npm ethereum web3

我想在我的 Ubuntu 18.04 上安装 web3。
我试过了:

sudo npm install -g web3

这引发了:

npm ERR! git clone --template=/home/sj/.npm/_git-remotes/_templates --mirror git@github.com:web3-js/WebSocket-Node.git /home/sj/.npm/_git-remotes/git-github-com-web3-js-WebSocket-Node-git-polyfill-globalThis-504e07ba: undefined npm ERR! git clone --template=/home/sj/.npm/_git-remotes/_templates --mirror git@github.com:web3-js/WebSocket-Node.git /home/sj/.npm/_git-remotes/git-github-com-web3-js-WebSocket-Node-git-polyfill-globalThis-504e07ba: undefined npm ERR! Linux 5.0.0-29-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "web3" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm ERR! code ENOGIT

npm ERR! not found: git npm ERR! npm ERR! Failed using git. npm ERR! This is most likely not a problem with npm itself. npm ERR! Please check if you have git installed and in your PATH.

npm ERR! Please include the following file with any support request: npm ERR! /home/sj/npm-debug.log



我也试过:
sudo npm install -g web3 --unsafe-perm=true --allow-root

帮助将不胜感激。
谢谢!

最佳答案

我已经更新了存储库并安装了 git:

# sudo apt-get update && sudo apt-get -y upgrade
# sudo apt-get -y install curl git vim build-essential

关于ubuntu - 如何在 Ubuntu 上安装 web3?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58131678/

相关文章:

vue.js - 我是否必须修复最新 nuxt.js 的审核问题?

ethereum - solidity:从具有相同 msg.sender 的另一个合约调用合约函数

svn - 谷歌代码 SVN checkin 错误

c - 从/dev/input/event读取

linux - 使用 Vagrant 和 Virtual box 创建开发服务器时出错

以太坊客户端 RPC 响应 403 "invalid host specified"

javascript - web3.eth.accounts[0] 返回未定义和 app.vote(1,{ from :web3. eth.accounts[0] }) 给出错误

python - 尽管 TNS_ADMIN 路径正确,Oracle Instant Client 在基于 Ubuntu 的代理上仍失败

javascript - 错误 : ENOENT: no such file or directory, 状态 '/home/arpit/.steampath'

node.js - npm install bcrypt 与 Node 5.0.0 和 npm 3.5.1