English 中文(简体)
诺埃略世界范例——象征眼光错误
原标题:nodejs hello world example - symbol lookup error

www.un.org/spanish/ecosoc UPDATE --LINUX FEDORA 15

以下实例:

http://simonwillison.net/2009/Nov/23/node/

<><>My Code:

var util = require( util ),
    http = require( http );

http.createServer(function(req, res) {
  res.sendHeader(200, { Content-Type :  text/html  });
  res.sendBody( <h1>Hello World</h1> );
  res.finish();
}).listen(8080);

util.puts( Server running at http://127.0.0.1:8080 );

www.un.org/spanish/ecosoc 产生以下错误:

[abu@Beelzebub node_projects]$ nodejs helloworld.js
Server running at http://127.0.0.1:8080
nodejs: symbol lookup error: nodejs: undefined symbol: _ZN2v82V816IdleNotificationEv
最佳回答

this is 2009 tutorial and old api. You should do it like this

var http = require( http );
var server = http.createServer(function (request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.end("Hello World
");
});
server.listen(8000);
console.log("Server running at http://127.0.0.1:8000/");

你们的教官老:

http://howtonode.org/hello-node

问题回答

为执行 no子申请,使用 no子而不是 no子。

node helloworld.js

具体错误似乎类似于第8号协议制造了0.615号错误。 你们是否尝试使用新版本(或向老年人转播)?





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签