Ubuntu node环境搭建 用时2分钟 sudo apt install nodejs-legacy node -v 查看版本号 sudo apt install npm npm -v 查看版本号 当执行以上语句报错说无法打开锁时,可以选择在网上查询,也可以选择重启Ubuntu系统。