0

OS X Lion を使用しています。Homebrew ( ) 経由で libyajl をインストールしましbrew install yajlた。ヘッダーは次の場所にあり/usr/local/include/yajlます。

scott @ scott-laptop : ~/Desktop
$ ls /usr/local/include/yajl
yajl_common.h  yajl_gen.h     yajl_parse.h   yajl_tree.h    yajl_version.h
scott @ scott-laptop : ~/Desktop
$ node -v
v0.8.5
scott @ scott-laptop : ~/Desktop
$ npm -v
1.1.46

しかし、Node モジュールのインストール時にエラーが発生します。

scott @ scott-laptop : ~/Desktop
$ npm install yajl
npm http GET https://registry.npmjs.org/yajl
npm http 304 https://registry.npmjs.org/yajl

> yajl@0.6.1 install /Users/scott/Desktop/node_modules/yajl
> node-waf configure build

Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : ok /usr/local 
Checking for node prefix                 : ok /usr/local 
Checking for header yajl/yajl_version.h  : not found 
/Users/scott/Desktop/node_modules/yajl/wscript:20: error: Could not find yajl headers. Make sure libyajl development package is installed.
npm ERR! yajl@0.6.1 install: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR! 
npm ERR! Failed at the yajl@0.6.1 install script.
npm ERR! This is most likely a problem with the yajl package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls yajl
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "yajl"
npm ERR! cwd /Users/scott/Desktop
npm ERR! node -v v0.8.5
npm ERR! npm -v 1.1.46
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/scott/Desktop/npm-debug.log
npm ERR! not ok code 0
4

1 に答える 1

0

Node 0.8.0 では、ビルド システムが node-waf から node-gyp に変更されました。ここで node-yajl フォークに gyp ビルドを追加しました: https://github.com/scttnlsn/node-yajl

于 2012-08-07T00:55:11.523 に答える