在 Fedora Core 上安装 socket.io 时出现问题
我正在尝试在我的计算机上安装 socket.io
,但当我按照其网站上的指示运行 npm install socket.io
时,我不断遇到错误。我不确定 npm 或 node.js 是否存在版本不兼容问题,或者我是否只是遗漏了一些明显的东西。据我所知,我拥有它们的最新稳定版本。
当我运行安装命令时,控制台输出 40 多个错误,最后我得到了行 npm not ok
。关于出了什么问题有什么想法吗?
I'm trying to install socket.io
on my machine, but I keep encountering errors when I run npm install socket.io
as directed on their website. I'm not sure if I have version incompatibilities for npm or node.js or if I'm simply missing something obvious. As far as I can tell, I have the most recent stable version of both of them.
When I run the install command, the console outputs 40+ errors, and at the end I am given the line npm not ok
. Any ideas as to what is going wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
错误是什么?
您是否使用
git
中的代码安装npm
?我只能猜测你没有使用稳定的代码,因为 git 的 master 分支通常不稳定。如果是这种情况,您可以从 git 存储库获取最新的代码并重新安装。
希望它能解决您的问题。
What is the error?
Are you installing
npm
using code fromgit
? I can only guess that you are not using a stable code, because the master branch from git is often unstable.If that is the case, what you can do is to get the latest code from the git repository and install it again.
Hope it will solved your problem.
如果您希望任何人尝试解决您的问题,您需要提供错误日志。了解您是从源还是 RPM 安装 Node 和 NPM 也会很有帮助。此外,如果您从源代码安装,您是进行标准安装还是进行自定义?
如果您能够从头开始,我建议您按照以下步骤操作,看看效果如何。安装到您的主目录中不需要 root,并且如果您需要重新开始,可以更轻松地清除所有内容。
./configure --prefix=~/Node/
)PATH=/home/user/Node /bin:$PATH
)curl http://npmjs.org/install.sh | sh
)You need to provide an error log if you want anyone to try and troubleshoot your problem. It would also be helpful to know whether you installed Node and NPM from source or RPM. Furthermore, if you installed from source, did you do a standard install or did you make customisations?
If you are able to start from scratch, I suggest following the steps below and seeing how you go. Installing into your home directory won't require root and it makes it easier to clear everything out if you need to start again.
./configure --prefix=~/Node/
)PATH=/home/user/Node/bin:$PATH
)curl http://npmjs.org/install.sh | sh
)