我正在尝试安装利用 canvas 模块的验证码 npm 模块。
不幸的是,我在 OSX 上安装该模块时遇到问题。我收到以下错误:
> canvas@1.0.4 install ....../node_modules/canvas
> node-gyp rebuild
not found: ldconfig
gyp: Call to './util/has_lib.sh jpeg' returned exit status 0. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/Cellar/node/0.10.21/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:424:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.21/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd ...../node_modules/canvas
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1
任何想法?显然缺少 ldconfig 。但是不知道怎么安装。
我正在使用自制软件,并且安装了最新的 XCode 和命令行工具。