Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js NPM安装sqlite3错误:节点gyp rebuild“;没有这样的文件或目录;_Node.js_Sqlite_Npm - Fatal编程技术网

Node.js NPM安装sqlite3错误:节点gyp rebuild“;没有这样的文件或目录;

Node.js NPM安装sqlite3错误:节点gyp rebuild“;没有这样的文件或目录;,node.js,sqlite,npm,Node.js,Sqlite,Npm,我似乎无法通过OSX Snow Leopard中的npm安装sqlite3,我还无法确定原因: bravo-de-esmolfo:project knight4$ npm install sqlite3 npm WARN package.json application-name@0.0.1 No repository field. npm WARN package.json application-name@0.0.1 No readme data. npm http GET https://

我似乎无法通过OSX Snow Leopard中的npm安装sqlite3,我还无法确定原因:

bravo-de-esmolfo:project knight4$ npm install sqlite3
npm WARN package.json application-name@0.0.1 No repository field.
npm WARN package.json application-name@0.0.1 No readme data.
npm http GET https://registry.npmjs.org/sqlite3
npm http 304 https://registry.npmjs.org/sqlite3
npm http GET https://registry.npmjs.org/tar.gz
npm http 304 https://registry.npmjs.org/tar.gz
npm WARN engine tar.gz@0.1.1: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.10","npm":"1.2.25"})
npm http GET https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/tar
npm http GET https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/tar
npm http 304 https://registry.npmjs.org/fstream
npm http 200 https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/block-stream
npm http 304 https://registry.npmjs.org/keypress
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/block-stream

> sqlite3@2.1.10 install /Users/knight4/Desktop/project/node_modules/sqlite3
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp", line 18, in <module>
    sys.exit(gyp.main(sys.argv[1:]))
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in main
    return gyp_main(args)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 508, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2105, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 769, in Write
    self.Pchify))
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1154, in WriteSources
    cflags = self.xcode_settings.GetCflags(configname)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 260, in GetCflags
    sdk_root = self._SdkPath()
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 247, in _SdkPath
    return os.path.join(self._GetSdkBaseDir(),
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 230, in _GetSdkBaseDir
    stderr=subprocess.STDOUT)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:415: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 10.8.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/knight4/Desktop/project/node_modules/sqlite3
gyp ERR! node -v v0.10.10
gyp ERR! node-gyp -v v0.9.6
gyp ERR! not ok 
npm ERR! weird error 1
npm ERR! not ok code 0
bravo de esmolfo:project knight4$npm安装sqlite3
npm WARN package.json应用程序-name@0.0.1没有存储库字段。
npm WARN package.json应用程序-name@0.0.1没有自述文件数据。
npm http GEThttps://registry.npmjs.org/sqlite3
npm http 304https://registry.npmjs.org/sqlite3
npm http GEThttps://registry.npmjs.org/tar.gz
npm http 304https://registry.npmjs.org/tar.gz
npm警告发动机焦油。gz@0.1.1:通缉:{“节点”:“0.8.x”}(当前:{“节点”:“v0.10.10”,“npm”:“1.2.25”})
npm http GEThttps://registry.npmjs.org/fstream
npm http GEThttps://registry.npmjs.org/tar
npm http GEThttps://registry.npmjs.org/commander
npm http 304https://registry.npmjs.org/tar
npm http 304https://registry.npmjs.org/fstream
npm http 200https://registry.npmjs.org/commander
npm http GEThttps://registry.npmjs.org/keypress
npm http GEThttps://registry.npmjs.org/rimraf
npm http GEThttps://registry.npmjs.org/mkdirp
npm http GEThttps://registry.npmjs.org/graceful-fs
npm http GEThttps://registry.npmjs.org/inherits
npm http GEThttps://registry.npmjs.org/inherits
npm http GEThttps://registry.npmjs.org/block-stream
npm http 304https://registry.npmjs.org/keypress
npm http 304https://registry.npmjs.org/rimraf
npm http 304https://registry.npmjs.org/graceful-fs
npm http 304https://registry.npmjs.org/mkdirp
npm http 304https://registry.npmjs.org/inherits
npm http 304https://registry.npmjs.org/inherits
npm http 304https://registry.npmjs.org/block-stream
> sqlite3@2.1.10安装/Users/knight4/Desktop/project/node_modules/sqlite3
>节点gyp重建
回溯(最近一次呼叫最后一次):
文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/gyp”,第18行,在
系统出口(gyp.main(sys.argv[1:]))
文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/pylib/gyp/_init__.py”,主文件第523行
返回gyp_干管(args)
文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/pylib/gyp/_init__.py”,第508行,在gyp_main中
generator.GenerateOutput(平面列表、目标、数据、参数)
文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/pylib/gyp/generator/make.py”,第2105行,在GenerateOutput中
_全部的第_部分=所需_目标中的合格_目标)
写入文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/pylib/gyp/generator/make.py”,第769行
自我保护(Pchify)
文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/pylib/gyp/generator/make.py”,第1154行,书面资源
cflags=self.xcode\u settings.GetCflags(configname)
GetCflags中的文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/pylib/gyp/xcode_emulation.py”,第260行
sdk_root=self._SdkPath()
文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/pylib/gyp/xcode_emulation.py”,第247行,位于SdkPath中
返回os.path.join(self.\u GetSdkBaseDir(),
文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/pylib/gyp/xcode_emulation.py”,第230行,在_GetSdkBaseDir中
stderr=subprocess.STDOUT)
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py”,第711行,在__
错误读取,错误写入)
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py”,第1308行,在执行子进程中
引发子对象异常
OSError:[Errno 2]没有这样的文件或目录
哎呀!配置错误
哎呀!堆栈错误:`gyp`失败,退出代码:1
哎呀!在ChildProcess.onCpExit处堆栈(/usr/local/lib/node_modules/npm/node_modules/node gyp/lib/configure.js:415:16)
哎呀!ChildProcess.EventEmitter.emit上的堆栈(events.js:98:17)
哎呀!在Process.ChildProcess.\u handle.onexit(child\u Process.js:789:12)处堆栈
哎呀!达尔文10.8.0系统
哎呀!命令“node”“/usr/local/lib/node_modules/npm/node_modules/node gyp/bin/node gyp.js”“rebuild”
哎呀!cwd/Users/knight4/Desktop/project/node_modules/sqlite3
哎呀!节点-v v0.10.10
哎呀!节点gyp-v v0.9.6
哎呀!不好
npm错误!奇怪的错误1
npm错误!不正常代码0

有什么想法吗?干杯

在OSX上,节点gyp依赖于python 2.7、make和gcc/g++。make、gcc和g++可以通过安装XCode然后使用XCode安装命令行工具来安装。

您的npm、node gyp、gcc/g++、python和make版本是什么?我猜某个地方存在版本问题,例如,节点gypnode不支持python 3.x.x-gyp@0.10.4 node@0.10.10It看起来它被蟒蛇噎住了,python在路径中吗?它是什么版本?看起来TooTallNate也在2小时前发布了一个变更,这可能有助于从版本号中删除rc:。。。。尝试执行以下命令:“python-c'导入平台;打印(platform.python_version());'”python 2.7.5。我下载Xcode是因为一个月前我不得不更换硬盘驱动器,所以gcc和make现在还没有安装。在任何情况下,他们安装在我的另一个(油炸)驱动器,它没有工作,但留下了不遗余力。