提问者:小点点

我已经在我的系统上安装了NODEjs,但是当我检查NODEjs版本时,它没有给我这个版本。 我该怎么办?


$ sudo apt install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  nodejs
1 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
Need to get 24.7 MB of archives.
After this operation, 111 kB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_14.x focal/main amd64 nodejs amd64 14.8.0-deb-1nodesource1 [24.7 MB]
Fetched 24.7 MB in 20s (1,246 kB/s)                                            
(Reading database ... 155976 files and directories currently installed.)
Preparing to unpack .../nodejs_14.8.0-deb-1nodesource1_amd64.deb ...
Unpacking nodejs (14.8.0-deb-1nodesource1) over (14.7.0-deb-1nodesource1) ...
Setting up nodejs (14.8.0-deb-1nodesource1) ...
Processing triggers for man-db (2.9.1-1) ...

$ nodejs -v

Command 'nodejs' not found, but can be installed with:

sudo apt install nodejs

在那之前我用过这些命令

curl-sl https://deb.nodesource.com/setup_14.x bash-apt-get install-y nodejs


共1个答案

匿名用户

检查以下命令

节点-v节点-version