用'纱线安装'安装'主角'依赖的问题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用'纱线安装'安装'主角'依赖的问题相关的知识,希望对你有一定的参考价值。
在命令行上执行yarn install
后,此错误来自错误:
yarn install v1.15.2
$ node tools/nodeVersionCheck.js
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@1.1.1: The platform "linux" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > estraverse-fb@1.3.1" has unmet peer dependency "estraverse@*".
[5/5] Building fresh packages...
[1/2] ⢀ protagonist
warning Error running install script for optional dependency: "project_directory/node_modules/protagonist: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: project_directory/node_modules/protagonist
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@8.15.1 | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/node_modules/npm/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 'project_directory/node_modules/protagonist/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'project_directory/node_modules/protagonist/common.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/user/.node-gyp/8.15.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/user/.node-gyp/8.15.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/user/.node-gyp/8.15.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=project_directory/node_modules/protagonist',
gyp info spawn args '-Dnode_engine=v8',
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 'project_directory/node_modules/protagonist/build'
CXX(target) Release/obj.target/libmarkdownparser/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.o
make: g++: Command not found
drafter/ext/snowcrash/libmarkdownparser.target.mk:131: recipe for target 'Release/obj.target/libmarkdownparser/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.o' failed
make: Leaving directory 'project_directory/eyes.git/node_modules/protagonist/build'
make: *** [Release/obj.target/libmarkdownparser/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.o] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 3.16.0-4-amd64
gyp ERR! command \"/usr/bin/node\" \"/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd project_directory/node_modules/protagonist
gyp ERR! node -v v8.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok"
[-/2] ⠐ waiting...
error project_directory/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: project_directory/node_modules/node-sass
Output:
Building: /usr/bin/node project_directory/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/node',
gyp verb cli 'project_directory/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp@3.5.0
gyp info using node@8.15.1 | linux | x64
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 "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.9\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.15.1
gyp verb command install [ '8.15.1' ]
gyp verb install input version string "8.15.1"
gyp verb install installing version: 8.15.1
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" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.15.1
gyp verb build dir attempting to create "build" dir: project_directory/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? project_directory/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: project_directory/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: project_directory/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: project_directory/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python2
gyp info spawn args [ 'project_directory/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 'project_directory/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'project_directory/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/user/.node-gyp/8.15.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/user/.node-gyp/8.15.1',
gyp info spawn args '-Dnode_gyp_dir=project_directory/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=project_directory/node_modules/node-sass',
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 verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /home/user/.node-gyp/8.15.1
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory 'project_directory/node_modules/node-sass/build'
g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.0.beta.2"' -I/home/user/.node-gyp/8.15.1/include/node -I/home/user/.node-gyp/8.15.1/src -I/home/user/.node-gyp/8.15.1/deps/uv/include -I/home/user/.node-gyp/8.15.1/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++0x -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
make: g++: Command not found
src/libsass.target.mk:142: recipe for target 'Release/obj.target/libsass/src/libsass/src/ast.o' failed
make: Leaving directory 'project_directory/node_modules/node-sass/build'
make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (project_directory/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 3.16.0-4-amd64
gyp ERR! command "/usr/bin/node" "project_directory/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd project_directory/node_modules/node-sass
gyp ERR! node -v v8.15.1
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
Build failed with error code: 1
这是protagonist
文件中的yarn.lock
部分:
protagonist@^1.6.0:
version "1.6.5"
resolved "https://registry.yarnpkg.com/protagonist/-/protagonist-1.6.5.tgz#8275380368811ac6253b70bb1ac619e426bbfc$
dependencies:
nan "~2.2.1"
命令yarn install
工作得很好,直到上周五。我检查了progragonist
的repo,master
分支的最新更新是在两个月前完成的。
我仍然是这项技术的菜鸟,所以我无法将错误输出解释为调试。欢迎任何帮助或建议。
答案
也许这是因为你的系统缺少g ++编译器?
make:g ++:找不到命令
也许你可以尝试安装g++
yum install gcc-g++
干杯
以上是关于用'纱线安装'安装'主角'依赖的问题的主要内容,如果未能解决你的问题,请参考以下文章
安装PHPstudy后我之前安装好的mysql不能用了怎么办
安装mysql后连接出错(错误:Access denied for user 'root'@'localhost' (using password: YES)"