Ubuntu 安装最新版nodejs
第一步,去 nodejs 官网 https://nodejs.org 看最新的版本号;
也就是说此时此刻,12.6.0 是最新的版本,不过你求稳的话建议选 10.16.0 的LTS版。
第二步,添加源后安装
重点来了,nodejs 的每个大版本号都有相对应的源,比如这里的 10.x.x版本的源是https://deb.nodesource.com/setup_10.x。
所以在终端执行:
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
稍等片刻,源已经添加完毕,再执行:
sudo apt-get install -y nodejs
等待安装完成。
顺带一提,如果你要安装12.x.x 的版本,只需要修改添加源地址中的数字即可,比如:
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
最后验证一下,执行:nodejs -v 即可出现刚才安装的版本号。
Ubuntu 安装最新版nodejs的更多相关文章
- Ubuntu安装最新版nodejs
今天在学习以太坊时,需要用到nodejs,因为使用的是ubuntu 16.04 LTS,一直安装的是老版本的nodejs,官方给方法用不成,折腾了半天,什么软链.手动编译,总觉得不很靠谱(linux水 ...
- 【转载】Ubuntu16.04安装最新版nodejs
安装最新版nodejs 更新ubuntu软件源 sudo apt-get update sudo apt-get install -y python-software-properties softw ...
- ubuntu -- 安装最新版的nodejs
1.安装最新的nodejs和npm # apt-get update # apt-get install -y python-software-properties software-properti ...
- ubuntu安装最新版node和npm
1.先在系统上安装好nodejs和npm sudo apt-get install nodejs-legacy sudo apt-get install npm 2.升级n ...
- Ubuntu安装最新版的nodejs
安装玩Ubuntu的虚拟机之后安装nodejs发现npm的版本才3.5.2,这都多老了?于是Google了一下,发现是由于Ubuntu官方维护的包源太老了,想要安装nodejs的最新版,两种方法,一种 ...
- ubuntu 安装 npm、nodejs 各种问题
nodejs let notifier = require('update-notifier')({pkg}) 报错 先卸载nodejs,然后安装稳定最新版 # apt-get remove node ...
- ubuntu16.04 安装最新版nodejs
ubuntu软件仓库中自带的nodejs版本过低 $ apt-cache policy nodejs nodejs: Installed: (none) Candidate: 4.2.6~dfsg-1 ...
- Ubuntu安装Python2.7,nodejs
安装Python2.7 sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7sudo apt-get update sudo apt-get ...
- Ubuntu安装Python2.7,nodejs,Redis
安装Python2.7 sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7sudo apt-get update sudo apt-get ...
随机推荐
- C语言程序设计100例之(20):过河卒
例20 过河卒 题目描述 如图1,在棋盘的A点有一个过河卒,需要走到目标B点.卒行走规则:可以向下.或者向右.同时在棋盘上的任一点有一个对方的马(如图1的C点),该马所在的点和所有跳跃一步可达的点称 ...
- Bit Manipulation-leetcode
Bit Manipulation Find the Difference /* * Given two strings s and t which consist of only lowercase ...
- Python 接口自动化常用方法封装
#!/usr/bin/env python # -*- coding:utf-8 -*- # ************************************* # @Time : 2019/ ...
- C#基本语法<一>_入门经典
基本信息 CIL和JIT CIL通用中间语言 JIT just-in-time使得CIT代码仅在需要时才编译 程序集 包含可执行文件.exe和库函数.dll和资源文件,不必把程序集集中到一个地方,全局 ...
- FCC---Use the CSS Transform Property skewX to Skew an Element Along the X-Axis
The next function of the transform property is skewX(), which skews the selected element along its X ...
- 微信小程序新服务消息推送 —— 订阅消息
微信团队前不久公测了「订阅消息」,原有的小程序模板消息接口将于 2020 年 1 月 10 日下线,届时将无法发送模板消息.「订阅消息」将完全替代「模板消息」,这两天得空测试了一波. 1.下发权限机制 ...
- iOS中计算字符串NSString的高度
根据固定宽度计算字符串高度: NSString *info = @"但是公司的高度是广东省公司的广东省高速度来开个大帅哥多撒谎个爱好就跟他说噶三公司噶是的刚好是我哥如果黑暗如果坏都干撒降低公 ...
- Python-1-Day
C = float(input("Enter a degree in Celsius:"))F = (9/5) * C + 32print("{0} Celsius is ...
- linux系统修改用户密码报错
版权声明:本文为博主原创文章,支持原创,转载请附上原文出处链接和本声明. 本文地址:https://www.cnblogs.com/wannengachao/p/12069113.html 1.设置新 ...
- Druid-代码段-4-3
所属文章:池化技术(一)Druid是如何管理数据库连接的? 本代码段对应流程4.2,防止内存泄漏的连接关闭检测: //回收长期未归还的连接(再次说明:该方法仅在removeAbandoned设置为tr ...