我试图将onoff安装到我的raspberrypi上。我安装了node和npm,但是当我运行时:
sudo npm install --unsafe-perm --verbose -g onoff
在以下情况之后陷入困境:
gyp verb extracted file from tarball tools/msvs/genfiles/node_perfctr_provider.h
你有什么想法吗?
以下是运行npm install命令后得到的结果:
pi@raspberrypi ~ $ sudo npm install --unsafe-perm --verbose -g onoff
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli 'install',
npm verb cli '--unsafe-perm',
npm verb cli '--verbose',
npm verb cli '-g',
npm verb cli 'onoff' ]
npm info using npm@2.5.1
npm info using node@v0.12.0
npm verb cache add spec onoff
npm verb addNamed onoff@*
npm verb addNameRange registry:https://registry.npmjs.org/onoff not in flight; f etching
npm verb request uri https://registry.npmjs.org/onoff
npm verb request no auth needed
npm info attempt registry request try #1 at 09:47:36
npm verb request id 79057999e8ab10b1
npm verb etag "1ED7ZJBPDILSN8P71ICWCIBA2"
npm http request GET https://registry.npmjs.org/onoff
npm http 304 https://registry.npmjs.org/onoff
npm verb etag https://registry.npmjs.org/onoff from cache
npm verb get saving onoff to /root/.npm/registry.npmjs.org/onoff/.cache.json
npm verb addNamed onoff@1.0.2
npm verb afterAdd /root/.npm/onoff/1.0.2/package/package.json not in flight; wri ting
npm verb afterAdd /root/.npm/onoff/1.0.2/package/package.json written
npm info install onoff@1.0.2 into /usr/local/lib
npm info installOne onoff@1.0.2
npm verb installOne of onoff to /usr/local/lib not in flight; installing
npm verb lock using /root/.npm/_locks/onoff-f2713974fa0ced28.lock for /usr/local /lib/node_modules/onoff
npm verb unbuild lib/node_modules/onoff
npm info preuninstall onoff@1.0.2
npm info uninstall onoff@1.0.2
npm verb unbuild rmStuff onoff@1.0.2 from /usr/local/lib/node_modules
npm info postuninstall onoff@1.0.2
npm verb gentlyRm vacuuming /usr/local/lib/node_modules/onoff
npm verb tar unpack /root/.npm/onoff/1.0.2/package.tgz
npm verb tar unpacking to /usr/local/lib/node_modules/onoff
npm verb gentlyRm vacuuming /usr/local/lib/node_modules/onoff
npm info preinstall onoff@1.0.2
npm verb cache add spec epoll@~0.1.12
npm verb addNamed epoll@>=0.1.12 <0.2.0
npm verb addNameRange registry:https://registry.npmjs.org/epoll not in flight; f etching
npm verb request uri https://registry.npmjs.org/epoll
npm verb request no auth needed
npm info attempt registry request try #1 at 09:47:43
npm verb etag "A3DT4BLFDXTSQGIQY2GSA3MNU"
npm http request GET https://registry.npmjs.org/epoll
npm http 304 https://registry.npmjs.org/epoll
npm verb etag https://registry.npmjs.org/epoll from cache
npm verb get saving epoll to /root/.npm/registry.npmjs.org/epoll/.cache.json
npm verb addNamed epoll@0.1.12
npm verb afterAdd /root/.npm/epoll/0.1.12/package/package.json not in flight; wr iting
npm verb afterAdd /root/.npm/epoll/0.1.12/package/package.json written
npm info install epoll@0.1.12 into /usr/local/lib/node_modules/onoff
npm info installOne epoll@0.1.12
npm verb installOne of epoll to /usr/local/lib/node_modules/onoff not in flight; installing
npm verb lock using /root/.npm/_locks/epoll-4c03fef6dbce0644.lock for /usr/local /lib/node_modules/onoff/node_modules/epoll
npm verb unbuild lib/node_modules/onoff/node_modules/epoll
npm verb gentlyRm vacuuming /usr/local/lib/node_modules/onoff/node_modules/epoll
npm verb tar unpack /root/.npm/epoll/0.1.12/package.tgz
npm verb tar unpacking to /usr/local/lib/node_modules/onoff/node_modules/epoll
npm verb gentlyRm vacuuming /usr/local/lib/node_modules/onoff/node_modules/epoll
npm info preinstall epoll@0.1.12
npm verb cache add spec nan@~1.6.2
npm verb addNamed nan@>=1.6.2 <1.7.0
npm verb addNameRange registry:https://registry.npmjs.org/nan not in flight; fet ching
npm verb cache add spec bindings@~1.2.1
npm verb addNamed bindings@>=1.2.1 <1.3.0
npm verb addNameRange registry:https://registry.npmjs.org/bindings not in flight ; fetching
npm verb request uri https://registry.npmjs.org/nan
npm verb request no auth needed
npm info attempt registry request try #1 at 09:47:47
npm verb etag "EI65ZGD4YQM5HZLU2BK7SJIT9"
npm http request GET https://registry.npmjs.org/nan
npm verb request uri https://registry.npmjs.org/bindings
npm verb request no auth needed
npm info attempt registry request try #1 at 09:47:47
npm verb etag "BJGP1201ZXLWX88VO1W0N0YSR"
npm http request GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan
npm verb etag https://registry.npmjs.org/nan from cache
npm verb get saving nan to /root/.npm/registry.npmjs.org/nan/.cache.json
npm http 304 https://registry.npmjs.org/bindings
npm verb etag https://registry.npmjs.org/bindings from cache
npm verb get saving bindings to /root/.npm/registry.npmjs.org/bindings/.cache.js on
npm verb addNamed nan@1.6.2
npm verb addNamed bindings@1.2.1
npm verb afterAdd /root/.npm/nan/1.6.2/package/package.json not in flight; writi ng
npm verb afterAdd /root/.npm/bindings/1.2.1/package/package.json not in flight; writing
npm verb afterAdd /root/.npm/nan/1.6.2/package/package.json written
npm verb afterAdd /root/.npm/bindings/1.2.1/package/package.json written
npm info install nan@1.6.2 into /usr/local/lib/node_modules/onoff/node_modules/e poll
npm info install bindings@1.2.1 into /usr/local/lib/node_modules/onoff/node_modu les/epoll
npm info installOne nan@1.6.2
npm verb installOne of nan to /usr/local/lib/node_modules/onoff/node_modules/epo ll not in flight; installing
npm info installOne bindings@1.2.1
npm verb installOne of bindings to /usr/local/lib/node_modules/onoff/node_module s/epoll not in flight; installing
npm verb lock using /root/.npm/_locks/nan-b11e02961bedc61b.lock for /usr/local/l ib/node_modules/onoff/node_modules/epoll/node_modules/nan
npm verb lock using /root/.npm/_locks/bindings-986bd2a734aeda4d.lock for /usr/lo cal/lib/node_modules/onoff/node_modules/epoll/node_modules/bindings
npm verb unbuild lib/node_modules/onoff/node_modules/epoll/node_modules/nan
npm verb unbuild lib/node_modules/onoff/node_modules/epoll/node_modules/bindings
npm verb gentlyRm vacuuming /usr/local/lib/node_modules/onoff/node_modules/epoll /node_modules/nan
npm verb gentlyRm vacuuming /usr/local/lib/node_modules/onoff/node_modules/epoll /node_modules/bindings
npm verb tar unpack /root/.npm/nan/1.6.2/package.tgz
npm verb tar unpacking to /usr/local/lib/node_modules/onoff/node_modules/epoll/n ode_modules/nan
npm verb gentlyRm vacuuming /usr/local/lib/node_modules/onoff/node_modules/epoll /node_modules/nan
npm verb tar unpack /root/.npm/bindings/1.2.1/package.tgz
npm verb tar unpacking to /usr/local/lib/node_modules/onoff/node_modules/epoll/n ode_modules/bindings
npm verb gentlyRm vacuuming /usr/local/lib/node_modules/onoff/node_modules/epoll /node_modules/bindings
npm info preinstall bindings@1.2.1
npm verb about to build /usr/local/lib/node_modules/onoff/node_modules/epoll/nod e_modules/bindings
npm info build /usr/local/lib/node_modules/onoff/node_modules/epoll/node_modules /bindings
npm verb linkStuff [ true,
npm verb linkStuff '/usr/local/lib/node_modules',
npm verb linkStuff false,
npm verb linkStuff '/usr/local/lib/node_modules/onoff/node_modules/epoll/node_ modules' ]
npm info linkStuff bindings@1.2.1
npm verb linkBins bindings@1.2.1
npm verb linkMans bindings@1.2.1
npm verb rebuildBundles bindings@1.2.1
npm info install bindings@1.2.1
npm info postinstall bindings@1.2.1
npm verb unlock done using /root/.npm/_locks/bindings-986bd2a734aeda4d.lock for /usr/local/lib/node_modules/onoff/node_modules/epoll/node_modules/bindings
npm info preinstall nan@1.6.2
npm verb about to build /usr/local/lib/node_modules/onoff/node_modules/epoll/nod e_modules/nan
npm info build /usr/local/lib/node_modules/onoff/node_modules/epoll/node_modules /nan
npm verb linkStuff [ true,
npm verb linkStuff '/usr/local/lib/node_modules',
npm verb linkStuff false,
npm verb linkStuff '/usr/local/lib/node_modules/onoff/node_modules/epoll/node_ modules' ]
npm info linkStuff nan@1.6.2
npm verb linkBins nan@1.6.2
npm verb linkMans nan@1.6.2
npm verb rebuildBundles nan@1.6.2
npm info install nan@1.6.2
npm info postinstall nan@1.6.2
npm verb unlock done using /root/.npm/_locks/nan-b11e02961bedc61b.lock for /usr/ local/lib/node_modules/onoff/node_modules/epoll/node_modules/nan
npm verb about to build /usr/local/lib/node_modules/onoff/node_modules/epoll
npm info build /usr/local/lib/node_modules/onoff/node_modules/epoll
npm verb linkStuff [ true,
npm verb linkStuff '/usr/local/lib/node_modules',
npm verb linkStuff false,
npm verb linkStuff '/usr/local/lib/node_modules/onoff/node_modules' ]
npm info linkStuff epoll@0.1.12
npm verb linkBins epoll@0.1.12
npm verb linkMans epoll@0.1.12
npm verb rebuildBundles epoll@0.1.12
npm verb rebuildBundles [ 'bindings', 'nan' ]
npm info install epoll@0.1.12
> epoll@0.1.12 install /usr/local/lib/node_modules/onoff/node_modules/epoll
> node-gyp rebuild
gyp info it worked if it ends with ok
gyp verb cli [ 'node',
gyp verb cli '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-g yp.js',
gyp verb cli 'rebuild' ]
gyp info using node-gyp@1.0.2
gyp info using node@0.12.0 | linux | arm
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp verb check python version `python -c "import platform; print(platform.python _version());"` returned: "2.7.3\n"
gyp verb get node dir no --target version specified, falling back to host node v ersion: v0.12.0
gyp verb command install [ 'v0.12.0' ]
gyp verb install input version string "v0.12.0"
gyp verb install installing version: 0.12.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 0
gyp verb needs "installVersion" 9
gyp verb install version is no good; reinstalling
gyp verb ensuring nodedir is created /root/.node-gyp/0.12.0
gyp http GET http://nodejs.org/dist/v0.12.0/node-v0.12.0.tar.gz
gyp http 200 http://nodejs.org/dist/v0.12.0/node-v0.12.0.tar.gz
gyp verb extracted file from tarball tools/msvs/genfiles/node_etw_provider.h
gyp verb extracted file from tarball tools/msvs/genfiles/node_perfctr_provider.h
答案 0 :(得分:1)
事实证明这个问题与berryboot有关。重新安装raspbian没有berryboot后,一切正常。 有关详细信息,请查看this ticket
答案 1 :(得分:0)
我不确定您正在使用哪个版本的Linux,但听起来您缺少构建必需的。
apt-get install -y build-essential
或google for your distro。