nodejs ubuntu20.04源码安装

运行jupyter的时候遇到报错,所以下载nodejs,apt下载的最高版本是10.19.0,所以选择源码安装

(Deprecated) Installing extensions with the jupyter labextension install command is now deprecated and will be removed in a future major version of JupyterLab.

Users should manage prebuilt extensions with package managers like pip and conda, and extension authors are encouraged to distribute their extensions as prebuilt packages 
An error occurred.
ValueError: Please install nodejs >=12.0.0 before continuing. nodejs may be installed using conda or directly from the nodejs website.
See the log file for details:  /tmp/jupyterlab-debug-0w81w6d5.log

目录

方法1:源码编译

方法2:下载编译好后的版本(树莓派适用)


方法1:源码编译

git仓库地址: GitHub - nodejs/node at v12.x

 输入命令行

cd node-12.x
sudo ./configure
sudo make
sudo make install
node --version

输出日志如下(make日志过长,只贴部分) 

nodejs ubuntu20.04源码安装_第1张图片

方法2:下载编译好后的版本(树莓派适用)

Index of /download/release/v12.22.12/ (nodejs.org)

1、解压

2、cd到bin文件

输入pwd命令查看完整路径

3、建立软连接

ubuntu@ubuntu:~$ sudo ln -s /home/ubuntu/tools/node-v12.22.12-linux-arm64/bin/node /usr/bin/
ubuntu@ubuntu:~$ sudo ln -s /home/ubuntu/tools/node-v12.22.12-linux-arm64/bin/npm /usr/bin/
ubuntu@ubuntu:~$ node -v
v12.22.12

安装完成

参考:【Deepin 20系统】解决ValueError: Please install nodejs >=12.0.0 before continuing_please install nodejs >=12.0.0 before continuing. _Better Bench的博客-CSDN博客

你可能感兴趣的:(install,vue.js,node.js,react.js,linux)