Npm : 依赖 node gyp 0.10 9 但是它将 不会
2021-03-17 本文已影响0人
斐硕人
- remove
sudo apt remove libuv1
- and then install
sudo apt-get install nodejs-dev node-gyp libssl1.0-dev
sudo apt-get install npm
sudo npm install -g n
sudo npm config set registry https://registry.npm
sudo n stable
下载node包,进入下载目录并执行
sudo tar --strip-components 1 -xvf node-v14.16.0-linux-x64.tar.xz --directory /usr/local/
- install nvm
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
.......................