【发布时间】:2021-12-24 13:08:03
【问题描述】:
mahima@INPUNML4JJ8043:/usr/bin$ npm -v
/usr/bin/env: ‘node’: No such file or directory
当我尝试创建符号链接时,它给出了错误。
mahima@INPUNML4JJ8043:/usr/bin$ ln -s /usr/bin/nodejs /usr/bin/node
ln: failed to create symbolic link '/usr/bin/node': File exists
当我尝试安装 npm 或 nodejs 时,它说它已经安装了。不知道是什么问题。
mahima@INPUNML4JJ8043:/usr/bin$ sudo apt-get install npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
npm is already the newest version (6.14.4+ds-1ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 80 not upgraded.
当我安装 nodejs 时
mahima@INPUNML4JJ8043:/usr/bin$ sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (10.19.0~dfsg-3ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 80 not upgraded.
我的机器有什么问题。然而今天我在尝试升级node 版本时犯了一些错误。现在没有任何效果。
【问题讨论】: