Cài đặt nodejs ổn định từ repository Ubuntu bằng cách chạy lệnh sau.
apt install nodejs
Output:
root@crown:~# apt install nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
apache2-data apache2-utils
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
libc-ares2 libjs-highlight.js libnode72 nodejs-doc
Suggested packages:
npm
The following NEW packages will be installed:
libc-ares2 libjs-highlight.js libnode72 nodejs nodejs-doc
Sau đó kiểm tra phiên bản của nodejs sau khi quá trình cài đặt hoàn tất.
root@crown:~# node --version
v14.1.0
Cài đặt phiên bản Node.js khác từ nguồn
Cài đặt trình quản lý NVM bằng cách sử dụng "wget".