No Mac, como usei node
para executar o NodeJS, presumo que faria o mesmo no Ubuntu (como gcc
para o compilador C GNU).
Então eu digitei node
e ele diz
The program 'node' can be found in the following packages:
* node
* nodejs-legacy
Try: sudo apt-get install <selected package>
Então parecia que seria node
.
Mas, se eu usar apt-cache search ^node$
para pesquisar sua descrição, isso não mostrará nada. Se eu usar apt-cache search ^nodejs$
, ele mostrará nodejs - evented I/O for V8 javascript
.
E assim parecia que seria nodejs
.
(Além disso, apt-cache show node
não exibiu nada, enquanto apt-cache show nodejs
mostrou muitas informações, então parecia haver uma chance maior de ser nodejs
. No entanto, e quando eu digitei% co_de? %, ele disse "O programa 'node' pode ser encontrado nos seguintes pacotes: node, nodejs-legacy"?)
Nesta situação, como você pode dizer qual é a correta? Estou menos interessado em saber qual é o correto, mas estou mais interessado em aprender como descobrir a partir da informação dada até agora.
Atualização:
como por solicitação @ muru, esta é a saída de
$ sudo apt-get update
Hit http://us.archive.ubuntu.com wily InRelease
Hit http://us.archive.ubuntu.com wily-updates InRelease
Hit http://security.ubuntu.com wily-security InRelease
Hit http://us.archive.ubuntu.com wily-backports InRelease
Hit http://us.archive.ubuntu.com wily/main Sources
Hit http://security.ubuntu.com wily-security/main Sources
Hit http://us.archive.ubuntu.com wily/restricted Sources
Hit http://security.ubuntu.com wily-security/restricted Sources
Hit http://us.archive.ubuntu.com wily/universe Sources
Hit http://us.archive.ubuntu.com wily/multiverse Sources
Hit http://security.ubuntu.com wily-security/universe Sources
Hit http://us.archive.ubuntu.com wily/main amd64 Packages
Hit http://us.archive.ubuntu.com wily/restricted amd64 Packages
Hit http://security.ubuntu.com wily-security/multiverse Sources
Hit http://us.archive.ubuntu.com wily/universe amd64 Packages
Hit http://security.ubuntu.com wily-security/main amd64 Packages
Hit http://us.archive.ubuntu.com wily/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com wily/main i386 Packages
Hit http://security.ubuntu.com wily-security/restricted amd64 Packages
Hit http://us.archive.ubuntu.com wily/restricted i386 Packages
Hit http://us.archive.ubuntu.com wily/universe i386 Packages
Hit http://security.ubuntu.com wily-security/universe amd64 Packages
Hit http://us.archive.ubuntu.com wily/multiverse i386 Packages
Hit http://us.archive.ubuntu.com wily/main Translation-en
Hit http://security.ubuntu.com wily-security/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com wily/multiverse Translation-en
Hit http://security.ubuntu.com wily-security/main i386 Packages
Hit http://us.archive.ubuntu.com wily/restricted Translation-en
Hit http://security.ubuntu.com wily-security/restricted i386 Packages
Hit http://us.archive.ubuntu.com wily/universe Translation-en
Hit http://security.ubuntu.com wily-security/universe i386 Packages
Hit http://us.archive.ubuntu.com wily-updates/main Sources
Hit http://us.archive.ubuntu.com wily-updates/restricted Sources
Hit http://security.ubuntu.com wily-security/multiverse i386 Packages
Hit http://us.archive.ubuntu.com wily-updates/universe Sources
Hit http://us.archive.ubuntu.com wily-updates/multiverse Sources
Hit http://security.ubuntu.com wily-security/main Translation-en
Hit http://us.archive.ubuntu.com wily-updates/main amd64 Packages
Hit http://security.ubuntu.com wily-security/multiverse Translation-en
Hit http://us.archive.ubuntu.com wily-updates/restricted amd64 Packages
Hit http://us.archive.ubuntu.com wily-updates/universe amd64 Packages
Hit http://security.ubuntu.com wily-security/restricted Translation-en
Hit http://us.archive.ubuntu.com wily-updates/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com wily-updates/main i386 Packages
Hit http://security.ubuntu.com wily-security/universe Translation-en
Hit http://us.archive.ubuntu.com wily-updates/restricted i386 Packages
Hit http://us.archive.ubuntu.com wily-updates/universe i386 Packages
Hit http://us.archive.ubuntu.com wily-updates/multiverse i386 Packages
Hit http://us.archive.ubuntu.com wily-updates/main Translation-en
Hit http://us.archive.ubuntu.com wily-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com wily-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com wily-updates/universe Translation-en
Hit http://us.archive.ubuntu.com wily-backports/main Sources
Hit http://us.archive.ubuntu.com wily-backports/restricted Sources
Hit http://us.archive.ubuntu.com wily-backports/universe Sources
Hit http://us.archive.ubuntu.com wily-backports/multiverse Sources
Hit http://us.archive.ubuntu.com wily-backports/main amd64 Packages
Hit http://us.archive.ubuntu.com wily-backports/restricted amd64 Packages
Hit http://us.archive.ubuntu.com wily-backports/universe amd64 Packages
Hit http://us.archive.ubuntu.com wily-backports/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com wily-backports/main i386 Packages
Hit http://us.archive.ubuntu.com wily-backports/restricted i386 Packages
Hit http://us.archive.ubuntu.com wily-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com wily-backports/multiverse i386 Packages
Hit http://us.archive.ubuntu.com wily-backports/main Translation-en
Hit http://us.archive.ubuntu.com wily-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com wily-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com wily-backports/universe Translation-en
Reading package lists... Done
$ apt-cache show node | grep -i Desc
$ # <-- nothing is showing up as result
$ apt-cache show node
N: Can't select versions from package 'node' as it is purely virtual
N: No packages found