Linux Mint Tina 中未安装最新版本的 Nodejs

Linux Mint Tina 中未安装最新版本的 Nodejs

环境

Linux Mint 19.2 蒂娜 84_x64

安装

$curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -

## Installing the NodeSource Node.js 10.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 http://archive.canonical.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease                        
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease              
Ign:4 http://packages.linuxmint.com tina InRelease                       
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease          
Hit:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease        
Hit:7 http://packages.linuxmint.com tina Release                        
Reading package lists... Done                     

## Confirming "tina" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_10.x/dists/tina/Release'

## Your distribution, identified as "tina", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support

安装Nodejs

$ sudo apt-get install nodejs
$ nodejs --version
v8.10.0

LTS 版本 10x 未安装?

答案1

您下载的安装脚本需要进行调整,以便它了解蒂娜是仿生释放。

首先,下载脚本: wget https://deb.nodesource.com/setup_10.x

然后,在您喜欢的编辑器中打开该文件。向下滚动,直到找到以 开头的部分check_alt。查找如下所示的行:

check_alt "Linux Mint" "tessa" "Ubuntu" "bionic"

在其正下方添加这一行:

check_alt "Linux Mint" "tina" "Ubuntu" "bionic"

保存后,运行chmod +x setup_10.x。现在您可以正常运行此脚本。

相关内容