Questi sono stati i miei passi per installare il nodo su Ubuntu 16.04:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y npm
quali sono le istruzioni ufficiali:
Dopo averlo fatto, l'esecuzione di nodejs --version
restituisce v4.2.6
.
Poiché ho usato setup_6.x
, stavo assumendo che una versione che inizia con 6
verrebbe installata?
Ho pensato che forse setup_6.x
dovrebbe essere setup_6.2.1
, ma quella pagina restituisce un 404, vedi:
link (c'è una pagina lì)
link (restituisce un 404)
Come installo l'ultima versione stabile del nodo su Ubuntu 16.04?
Modifica
Questi sono risultati dopo l'esecuzione di sudo apt-get install -y nodejs
:
sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gyp libboost-python1.58.0 libjs-inherits libjs-node-uuid libjs-underscore
libssl-dev libssl-doc libuv1-dev linux-headers-4.4.0-18
linux-headers-4.4.0-18-generic linux-headers-4.4.0-21
linux-headers-4.4.0-21-generic linux-image-4.4.0-18-generic
linux-image-4.4.0-21-generic linux-image-extra-4.4.0-18-generic
linux-image-extra-4.4.0-21-generic linux-signed-image-4.4.0-18-generic
linux-signed-image-4.4.0-21-generic python-configobj python-pycurl
python-pyexiv2 python-pyexiv2-doc
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
nodejs
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
Need to get 0 B/3,162 kB of archives.
After this operation, 13.2 MB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 329473 files and directories currently installed.)
Preparing to unpack .../nodejs_4.2.6~dfsg-1ubuntu4_amd64.deb ...
Unpacking nodejs (4.2.6~dfsg-1ubuntu4) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (4.2.6~dfsg-1ubuntu4) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Modifica
Risultati di apt-cache policy nodejs
:
apt-cache policy nodejs
nodejs:
Installed: 4.2.6~dfsg-1ubuntu4
Candidate: 4.2.6~dfsg-1ubuntu4
Version table:
*** 4.2.6~dfsg-1ubuntu4 500
500 http://au.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
100 /var/lib/dpkg/status