1
我試圖編譯下面MWE,從the official Node.js documentation主要採取:節點GYP配置總是失敗,EXDEV錯誤
#include<v8.h>
#include<node.h>
using namespace v8;
Handle<Value> Method (const Arguments& _args) {
HandleScope Scp;
return Scp.Close (String::New ("world"));
}
void Initialize (Handle<Object> _target) {
_target->Set (
String.NewSymbol ("hello"),
FunctionTemplate::New (Method)->GetFunction()
);
}
NODE_MODULE ("Hello", Initialize)
相應binding.gyp
文件如下:
{
"targets": [
{
"target_name": "hello",
"sources": ["hello.cpp"]
}
]
}
當我試圖運行node-gyp configure
,我得到以下錯誤:
$ node-gyp configure
info it worked if it ends with ok
info downloading http://nodejs.org/dist/v0.6.18/node-v0.6.18.tar.gz
ERR! Error: EXDEV, link '/usr/lib/nodejs/node-gyp/legacy/tools/gyp/pylib/gyp/easy_xml.pyc'
ERR! not ok
$
我運行Fedora 17的64位版本以下是uname -a
輸出:提前
$ rpm -q nodejs
nodejs-0.6.18-1.fc17.x86_64
$ rpm -q node-gyp
node-gyp-0.4.1-2.fc17.noarch
感謝您的幫助:
Linux localhost.localdomain 3.5.5-2.fc17.x86_64 #1 SMP Wed Oct 3 13:20:37 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
下面是一些系統信息。