当我第一次通过npm start安装并运行Ghost时,所有的初始config.js设置都很好。
在完成了几个教程/问题之后,当我对config.js进行任何更改时,仍然会遇到weird error 8
Installing Ghost on Centos 6.4
Ghost Docs
非常感谢您的帮助/见解。
我有
重新安装的Ghost
重新启动我的Centos机器
尝试使用--production标记启动npm
尝试将配置中的主机/端口编辑为多个选项
使用初始配置js

$ npm start --production

ghost@0.4.1 start /var/www/html/Projects/ghost.mydomain.name/ghost
node index

Ghost is running...
Your blog is now available on http://my-ghost-blog.com
Ctrl+C to shut down
^C
Ghost has shut down
Your blog is now offline

现在将配置更改为0.0.0.0和端口80
dev at centos64  /var/www/html/Projects/ghost.mydomain.name/ghost
$ npm start --production

ghost@0.4.1 start /var/www/html/Projects/ghost.mydomain.name/ghost
node index


events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EACCES
    at errnoException (net.js:901:11)
    at Server._listen2 (net.js:1020:19)
    at listen (net.js:1061:10)
    at net.js:1135:9
    at dns.js:72:18
    at process._tickCallback (node.js:415:13)
    at process._tickFromSpinner (node.js:390:15)
npm ERR! weird error 8
npm ERR! not ok code 0

最佳答案

这是因为您的端口80正被另一个程序使用。尝试在终端上运行此命令以查看谁是罪魁祸首:

netstat -tulpn | grep :80

最后一列表示程序的名称。例如:
 0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      1215/nginx

罪魁祸首是nginx。输入kill 1215停止运行进程。

关于linux - 奇怪的错误8-Centos 6.4上的Ghost博客,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22043966/

10-09 20:29
查看更多