1

我在 Node.js 上运行一个简单的 Hello World 时遇到问题。我正在使用 CentOS 并通过 yum 安装它。当我使用 Node.js 运行文件时,会弹出此错误:

node: symbol lookup error: node: undefined symbol: ares_library_init

我尝试搜索谷歌无济于事。我只发现这是属于c-ares库的。知道如何解决这个问题吗?

该文件包含以下内容:

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('服务器运行在 http://127.0.0.1:1337/');
4

1 回答 1

0

解决了。你不能用百胜。

百胜删除nodejs
git 克隆 http://github.com/joyent/node.git
光盘节点
git 结帐 v0.4.10
。/配置
制作
进行安装
于 2011-08-03T11:51:06.270 回答