Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install opencv gyp failed with exit code: 1 #669

Open
marcoippolito opened this issue Mar 12, 2020 · 0 comments
Open

npm install opencv gyp failed with exit code: 1 #669

marcoippolito opened this issue Mar 12, 2020 · 0 comments

Comments

@marcoippolito
Copy link

marcoippolito commented Mar 12, 2020

(base) marco@pc01:~/webMatters/vueMatters/PeerJS-VueJS-Test$ npm install opencv

> [email protected] install /home/marco/webMatters/vueMatters/PeerJS-VueJS-Test/node_modules
/opencv
> node-gyp rebuild

Traceback (most recent call last):
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/gyp_main.py", line 50, in <module>
    sys.exit(gyp.script_main())
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
    return main(sys.argv[1:])
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/__init__.py", line 547, in main
    return gyp_main(args)
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
    options.duplicate_basename_check)
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/__init__.py", line 139, in Load
    params['parallel'], params['root_targets'])
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/input.py", line 2779, in Load
    variables, includes, depth, check, True)
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/input.py", line 417, in LoadTargetBuildFile
    build_file_data, PHASE_EARLY, variables, build_file_path)
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/input.py", line 1296, in ProcessVariablesAndConditionsInDict
    build_file)
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/input.py", line 1311, in ProcessVariablesAndConditionsInList
    ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/input.py", line 1270, in ProcessVariablesAndConditionsInDict
    ProcessConditionsInDict(the_dict, phase, variables, build_file)
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/input.py", line 1149, in ProcessConditionsInDict
    variables, build_file)
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/input.py", line 1296, in ProcessVariablesAndConditionsInDict
    build_file)
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/input.py", line 1315, in ProcessVariablesAndConditionsInList
    expanded = ExpandVariables(item, phase, variables, build_file)
  File "/home/marco/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/input.py", line 914, in ExpandVariables
    sys.stderr.write(p_stderr)
TypeError: write() argument must be str, not bytes while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/marco/.nvm/versions/node/v12.15.0
/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 5.3.0-40-generic
gyp ERR! command "/home/marco/.nvm/versions/node/v12.15.0/bin/node" "/home/marco
/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" 
"rebuild"
gyp ERR! cwd /home/marco/webMatters/vueMatters/PeerJS-VueJS-Test/node_modules/opencv
gyp ERR! node -v v12.15.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]  
(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for  
[email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output 
above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/marco/.npm/_logs/2020-03-12T09_50_23_822Z-debug.log


(base) marco@pc01:~/webMatters/vueMatters/PeerJS-VueJS-Test$ vue info

Environment Info:

  System:
    OS: Linux 5.3 Ubuntu 18.04.4 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
  Binaries:
    Node: 12.15.0 - ~/.nvm/versions/node/v12.15.0/bin/node
    Yarn: Not Found
    npm: 6.13.4 - ~/.nvm/versions/node/v12.15.0/bin/npm

 OpenCV Version: 4.2.0

I attach here the link to the complete 2020-03-12T09_50_23_822Z-debug.log file:
https://drive.google.com/open?id=1Sbnbqsg2mwQp1kZRBk24KPMn7lQxi0od

How to solve the problem?
Looking forward to your kind help.
Marco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant