统信UOS系统安装nodejs14

UOS Install Node14

1.参考官方脚本安装nodejs
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
sudo apt-get install -y nodejs

报错:Your distribution,identified as "n/a",is not currently supported,please contactNodeSource at...
解决方案:
wget https://deb.nodesource.com/setup_14.x
修改脚本文件:DISTRO=$(lsb_release -c -s)为DISTRO=stable
sudo chmod +x setup_14.x
sudo ./setup_14.x
sudo apt-get install -y nodejs

2.安装yarn包管理器
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn

3.验证安装完成
node -v

参考文章

https://www.cnblogs.com/forheart/p/13203249.html
https://blog.csdn.net/w851685279/article/details/118066519

实测操作系统

统信UOS
银河麒麟

你可能感兴趣的:(统信UOS系统安装nodejs14)