2016-10-13 5 views
0

bson node.jsモジュールに問題があるため、プロジェクトがコンパイルされません。gyp == 0.1の分布が見つかりません

pkg_resources.DistributionNotFound: The 'gyp==0.1' distribution was not found and is required by the application

コンソール:

~/keystone-react/node_modules/bson$ make 
node-gyp clean 
gyp info it worked if it ends with ok 
gyp info using [email protected] 
gyp info using [email protected] | linux | x64 
gyp info ok 
node-gyp configure build 
gyp info it worked if it ends with ok 
gyp info using [email protected] 
gyp info using [email protected] | linux | x64 
gyp info spawn python 
gyp info spawn args [ '/usr/share/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/user/keystone-react/node_modules/bson/build/config.gypi', 
gyp info spawn args '-I', 
gyp info spawn args '/usr/share/node-gyp/addon.gypi', 
gyp info spawn args '-I', 
gyp info spawn args '/usr/include/nodejs/common.gypi', 
gyp info spawn args '-Dlibrary=shared_library', 
gyp info spawn args '-Dvisibility=default', 
gyp info spawn args '-Dnode_root_dir=/usr/include/nodejs', 
gyp info spawn args '-Dmodule_root_dir=/home/user/keystone-react/node_modules/bson', 
gyp info spawn args '--depth=.', 
gyp info spawn args '--generator-output', 
gyp info spawn args 'build', 
gyp info spawn args '-Goutput_dir=.' ] 
Traceback (most recent call last): 
    File "/usr/share/node-gyp/gyp/gyp_main.py", line 9, in <module> 
    load_entry_point('gyp==0.1', 'console_scripts', 'gyp')() 
    File "/opt/bitnami/python/lib/python2.7/site-packages/pkg_resources/__init__.py", line 567, in load_entry_point 
    return get_distribution(dist).load_entry_point(group, name) 
    File "/opt/bitnami/python/lib/python2.7/site-packages/pkg_resources/__init__.py", line 559, in get_distribution 
    dist = get_provider(dist) 
    File "/opt/bitnami/python/lib/python2.7/site-packages/pkg_resources/__init__.py", line 433, in get_provider 
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0] 
    File "/opt/bitnami/python/lib/python2.7/site-packages/pkg_resources/__init__.py", line 970, in require 
    needed = self.resolve(parse_requirements(requirements)) 
    File "/opt/bitnami/python/lib/python2.7/site-packages/pkg_resources/__init__.py", line 856, in resolve 
    raise DistributionNotFound(req, requirers) 
pkg_resources.DistributionNotFound: The 'gyp==0.1' distribution was not found and is required by the application 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16) 
gyp ERR! stack  at ChildProcess.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:809:12) 
gyp ERR! System Linux 3.16.0-4-amd64 
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "configure" "build" 
gyp ERR! cwd /home/user/keystone-react/node_modules/bson 
gyp ERR! node -v v0.10.29 
gyp ERR! node-gyp -v v0.12.2 
gyp ERR! not ok 
Makefile:11: recipe for target 'node_gyp' failed 
make: *** [node_gyp] Error 1 

オリジナルエラー:

~/keystone-react$ node keystone 
{ Error: Cannot find module '../build/Release/bson' 
    at Function.Module._resolveFilename (module.js:455:15) 
    at Function.Module._load (module.js:403:25) 
    at Module.require (module.js:483:17) 
    at require (internal/module.js:20:19) 
    at Object.<anonymous> (/home/user/keystone-react/node_modules/bson/ext/index.js:15:10) 
    at Module._compile (module.js:556:32) 
    at Object.Module._extensions..js (module.js:565:10) 
    at Module.load (module.js:473:32) 
    at tryModuleLoad (module.js:432:12) 
    at Function.Module._load (module.js:424:3) 
    at Module.require (module.js:483:17) 
    at require (internal/module.js:20:19) 
    at Object.<anonymous> (/home/user/keystone-react/node_modules/bson/lib/bson/index.js:3:24) 
    at Module._compile (module.js:556:32) 
    at Object.Module._extensions..js (module.js:565:10) 
    at Module.load (module.js:473:32) code: 'MODULE_NOT_FOUND' } 
js-bson: Failed to load c++ bson extension, using pure JS version 

------------------------------------------------ 
KeystoneJS Started: 
keystone-react is ready on port 3000 
------------------------------------------------ 

答えて

0

- 私は手動makeにそれをしようとしたエラーだ 'GYP == 0.1' をPythonスクリプトでは見られません以下のコマンドでpipモジュールをインストールすることができます:

pip install git+https://chromium.googlesource.com/external/gyp 
0

Pipは、hereの説明に従って、VCSリポジトリからのインストールをサポートしています。

以下は、私の仕事:

pip install https://github.com/nodejs/node-gyp#subdirectory=gyp

関連する問題