gpt4 book ai didi

node.js - node-gyp 重建时出错

转载 作者:太空宇宙 更新时间:2023-11-03 23:39:54 25 4
gpt4 key购买 nike

pi@raspberrypi ~ $ sudo node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.2
gyp info using node@0.10.31 | linux | arm
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.node-gyp/0.10.31/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/0.10.31',
gyp info spawn args '-Dmodule_root_dir=/home/pi',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/pi/build'
make: *** No rule to make target 'Release/obj.target/binding/src/binding.o', needed by 'Release/obj.target/binding.node'. Stop.
make: Leaving directory '/home/pi/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.12.22+
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi
gyp ERR! node -v v0.10.31
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

这是我的错误代码。

绑定(bind).gyp

{
"targets": [
{
"target_name": "binding",
"sources": ["src/binding.cc"]
}
]
}

我安装了“npm make”并且我执行“sudo apt-get install python-dev”然后可能安装了python2.7我安装“sudo apt-get install gcc”我不明白

make: Entering directory '/home/pi/build'
make: *** No rule to make target 'Release/obj.target/binding/src/binding.o', needed by 'Release/obj.target/binding.node'. Stop.
make: Leaving directory '/home/pi/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2

这句话是什么意思?为什么我做不到?

最佳答案

您确定路径src/binding.cc存在吗?听起来目录或文件名错误。

关于node.js - node-gyp 重建时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25810453/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com