deepin安裝node,npm

評價deepin

首先更新是落後於ubuntu的,所以導致可能很多最基本的庫是舊的,甚至於內核,導致很多軟件安裝比較困難。

apt-get安裝版本舊的不行

推薦nvm安裝

root@qbt:/home/qbt/Downloads# wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
> Downloading nvm from git to '/root/.nvm'
=> 正克隆到 '/root/.nvm'...
remote: Enumerating objects: 267, done.
remote: Counting objects: 100% (267/267), done.
remote: Compressing objects: 100% (242/242), done.
remote: Total 267 (delta 31), reused 80 (delta 15), pack-reused 0
接收對象中: 100% (267/267), 119.47 KiB | 0 bytes/s, 完成.
處理 delta 中: 100% (31/31), 完成.
=> Compressing and cleaning up git repository

=> Appending nvm source string to /root/.bashrc
=> Appending bash_completion source string to /root/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
root@qbt:/home/qbt/Downloads# source ~/.bashrc
root@qbt:/home/qbt/Downloads# nvm --version
0.33.11
root@qbt:/home/qbt/Downloads# 
root@qbt:/home/qbt/Downloads# 
root@qbt:/home/qbt/Downloads# nvm install stable
Downloading and installing node v12.4.0...
Downloading https://nodejs.org/dist/v12.4.0/node-v12.4.0-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v12.4.0 (npm v6.9.0)
Creating default alias: default -> stable (-> v12.4.0)
root@qbt:/home/qbt/Downloads# node -v
v12.4.0
root@qbt:/home/qbt/Downloads# npm -v
6.9.0

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章