[英]What is wrong with following installation steps of latest nodejs on Ubuntu 14.04?
為什么我不能簡單地安裝最新的nodejs。 我已經執行了curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - 之后我執行了以下操作
ubuntu@ip-172-31-2-33:/$ sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 188 not upgraded.
ubuntu@ip-172-31-2-33:~$ which node
ubuntu@ip-172-31-2-33:~$ which nodejs
ubuntu@ip-172-31-2-33:~$ whereis node
node:
ubuntu@ip-172-31-2-33:~$ whereis nodejs
nodejs:
ubuntu@ip-172-31-2-33:/$ node -v
The program 'node' can be found in the following packages:
* node
* nodejs-legacy
操作系統是Ubuntu 14.04
試試運行:
which nodejs
如果此命令有結果,則獲取該目錄位置並使用“node”名稱為其創建符號鏈接。
該命令應如下所示:
sudo ln -s /usr/bin/nodejs /usr/bin/node
清除和安裝工作:
sudo apt-get purge nodejs*
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -
sudo apt-get install -y nodejs
which nodejs
在/ usr / bin中/的NodeJS
which node
的/ usr /斌/節點
node -v
v7.7.3
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.