untuk beberapa service dibutuhkan nodejs versi diatas 6. jadi terpaksa mau ga mau install nodejs 6.
1. bikin setiingan repo di source list untuk nodejs
cd /etc/apt/sources.list.d/nodesource.list
2.masukkan data berikut ke nodesource.list:
3. cek.deb https://deb.nodesource.com/node_6.x xenial main deb-src https://deb.nodesource.com/node_6.x xenial main
4.manual update repo.curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
sudo apt-get update
5.cek policy
apt-cache policy nodejs
hasilroot@fixduino /etc/apt/sources.list.d # apt-cache policy nodejs
nodejs:
Installed: (none)
Candidate: 6.11.2-1nodesource1~xenial1
Version table:
6.11.2-1nodesource1~xenial1 500
500 https://deb.nodesource.com/node_6.x xenial/main amd64 Packages
4.2.6~dfsg-1ubuntu4.1 500
500 http://id.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
4.2.6~dfsg-1ubuntu4 500
500 http://id.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
6.install nodejs v6.
sudo apt-get install nodejs
source:
https://askubuntu.com/questions/786272/why-does-installing-node-6-x-on-ubuntu-16-04-actually-install-node-4-2-6
Share This :
0 comments