我想在我的 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/