薩拉姆(意味着你好):)Node.js的未處理的「錯誤」事件中使用時http.createServer()聽()在Ubuntu 12.04
我已經開發了Node.js的腳本在我的Windows七機它工作正常。但是當我在我的Ubuntu 12.04運行它,下面的錯誤出現並且停止我的應用程序:
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 Server.listen (net.js:1127:5)
at Object.start (/httpServer/httpServer.js:9:34)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
,並導致錯誤的位置是在這一行.listen(80)
:
http.createServer(onRequest).listen(80);
^
我也嘗試了一些其他端口號(如100,300,500,...)而不是80
,並且錯誤仍然相同。
的[應用程序的NodeJS即使沒有其他進程阻塞不能在80端口上運行可能重複端口。](http://stackoverflow.com/questions/18947356/nodejs-app-cant-run-on-port-80-even-though-theres-no-other-process-blocking-th) – hexacyanide