【发布时间】:2018-11-01 15:07:33
【问题描述】:
我正在尝试在共享主机上安装 NodeJS。我从
下载了源代码https://nodejs.org/en/download/
并使用./config --prefix="$HOME/local" 遵循通常的安装过程。
它编译没有错误。但是,当我尝试运行它时,出现以下错误:
installing /kunden/homepages/32/d690510543/htdocs/local/include/node/zconf.h
installing /kunden/homepages/32/d690510543/htdocs/local/include/node/zlib.h
(uiserver):xxxxxxxx:~/node-v8.11.2$ which node
/kunden/homepages/32/d690510543/htdocs/local/bin/node
(uiserver):xxxxxxxx:~/node-v8.11.2$ node
#
# Fatal error in , line 0
# API fatal error handler returned after process out of memory
#
Illegal instruction
但是,我可以得到版本
$ node -v
v8.11.2
和帮助。
不过,我无法运行脚本
(uiserver):xxxxxxxx:~$ cat hello.js
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');
(uiserver):xxxxxxxx:~$ node hello.js
#
# Fatal error in , line 0
# API fatal error handler returned after process out of memory
#
Illegal instruction
我也无法输入 REPL:
(uiserver):xxxxxxxx:~$ node -i
#
致命错误,第 0 行
处理内存不足后返回的 API 致命错误处理程序
# 非法指令
【问题讨论】:
标签: node.js installation shared-hosting