- 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"
.......................
网友评论