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日志过长,只贴部分) 

方法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博客

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值