gpt4 book ai didi

linux - Node.js 安装错误

转载 作者:太空宇宙 更新时间:2023-11-04 10:44:27 25 4
gpt4 key购买 nike

我已经根据以下内容安装了 Node.js、NVM 和 NPM:https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server

我的工作目录是这样的:

Working_Files\WebRTC 包含以下文件:

  • package.json
  • server.js

Working_Files\WebRTC\views 其中包含一个索引文件:

index.ejs

在 Working_Files\WebRTC 中,为了运行服务器,使用:

  node server.js

每次我都必须重复安装中解释的过程,否则我会收到错误:

 node server.js 
The program 'node' can be found in the following packages:
* node
* nodejs-legacy
Try: sudo apt-get install <selected package>

请问错误在哪里?

谢谢

最佳答案

试试这个:sudo ln -s "$(which nodejs)"/usr/bin/node

然后再次运行 node server.js

关于linux - Node.js 安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33675450/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com