node.js - 找不到命令“nodejs”,但可以安装:sudo apt install nodejs in ububtu
问题描述
已安装 node.js 但显示
nodejs
找不到命令,但可以安装:
sudo apt install nodejs
然后试了,sudo apt install nodejs
并显示
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (14.13.1-deb-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
但是当我尝试检查 node.js 版本时,$ nodejs -v
它显示,nodejs
找不到命令,但可以安装:
sudo apt install nodejs
请帮我解决这个错误并正确查看 node.js 版本
解决方案
The nodejs executable is called node
, please run node --version
to see if your installation works.
推荐阅读
- javascript - 如何从Ruby变量存储在Javascript中的localStorage
- android - 使用导航组件在不同图形之间导航
- tfs - Azure Devops 指定较短的路径错误
- ios - 如何使用图表 (IOS) 在 X 轴上显示每个月
- r - 在 R 中自动选择最优 GARCH 模型
- sql-server - 通用 ODBC 连接字符串适用于 SQL Server 2005+
- c# - 当前上下文中不存在 TextToSplit
- ios - 当用户停止使用 swift 5 说话时如何终止语音识别
- docker - Logstash 不处理 filebeat 发送的文件
- javascript-objects - 购买后更新库存