nodejs在linux下启动80端口报错 作者:马育民 • 2017-09-05 21:55 • 阅读:10136 nodejs在linux下启动80端口会提示如下错误: ```shell server is run,port is 80 events.js:160 throw er; // Unhandled 'error' event ^ Error: listen EACCES 0.0.0.0:80 at Object.exports._errnoException (util.js:1020:11) at exports._exceptionWithHostPort (util.js:1043:20) at Server._listen2 (net.js:1245:19) at listen (net.js:1294:10) at Server.listen (net.js:1390:5) at EventEmitter.listen (/home/mym/devdatas/nodejs/movie/node_modules/express/lib/application.js:618:24) at Object. (/home/mym/devdatas/nodejs/movie/app.js:25:5) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) ``` 原因是在linux中,1024以下的端口只有root用户才有权使用,所以启动nodejs时要加上sudo ```shell sudo node app.js ``` 原文出处:http://malaoshi.top/show_1C7bxqBEcYY.html