pierreinglebert / node-zopfli

Node bindings for Zopfli Compression Algorithm (zlib, gzip, deflate compatible)
MIT License
110 stars 39 forks source link

Installation fails on Linux #86

Closed apaatsio closed 5 years ago

apaatsio commented 7 years ago
❯ node --version
v7.9.0
❯ npm --version
4.2.0
❯ python --version
Python 2.7.13
❯ gcc --version
gcc (GCC) 6.3.1 20170306
❯ npm install node-zopfli

> node-zopfli@2.0.2 install /tmp/node-zopfli-test/node_modules/node-zopfli
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://node-zopfli.s3.amazonaws.com/Release/zopfli-v2.0.2-node-v51-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for node-zopfli@2.0.2 and node@7.9.0 (node-v51 ABI) (falling back to source compile with node-gyp) 
Traceback (most recent call last):
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 514, in gyp_main
    options.duplicate_basename_check)
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 130, in Load
    params['parallel'], params['root_targets'])
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2778, in Load
    variables, includes, depth, check, True)
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 394, in LoadTargetBuildFile
    includes, True, check)
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 266, in LoadOneBuildFile
    aux_data, includes, check)
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 304, in LoadBuildFileIncludesIntoDict
    subdict_path, include)
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2144, in MergeDicts
    MergeDicts(to[k], v, to_file, fro_file)
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2137, in MergeDicts
    to[k] = MakePathRelative(to_file, fro_file, v)
  File "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2036, in MakePathRelative
    if item[-1] == '/':
IndexError: string index out of range while reading includes of binding.gyp 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/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:308:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.10.12-1-MANJARO
gyp ERR! command "/home/antti/.nvm/versions/node/v7.9.0/bin/node" "/home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/tmp/node-zopfli-test/node_modules/node-zopfli/lib/binding/node-v51-linux-x64/zopfli.node" "--module_name=zopfli" "--module_path=/tmp/node-zopfli-test/node_modules/node-zopfli/lib/binding/node-v51-linux-x64"
gyp ERR! cwd /tmp/node-zopfli-test/node_modules/node-zopfli
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/home/antti/.nvm/versions/node/v7.9.0/bin/node /home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/node-zopfli-test/node_modules/node-zopfli/lib/binding/node-v51-linux-x64/zopfli.node --module_name=zopfli --module_path=/tmp/node-zopfli-test/node_modules/node-zopfli/lib/binding/node-v51-linux-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/node-zopfli-test/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:899:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.10.12-1-MANJARO
node-pre-gyp ERR! command "/home/antti/.nvm/versions/node/v7.9.0/bin/node" "/tmp/node-zopfli-test/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /tmp/node-zopfli-test/node_modules/node-zopfli
node-pre-gyp ERR! node -v v7.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok 
Failed to execute '/home/antti/.nvm/versions/node/v7.9.0/bin/node /home/antti/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/node-zopfli-test/node_modules/node-zopfli/lib/binding/node-v51-linux-x64/zopfli.node --module_name=zopfli --module_path=/tmp/node-zopfli-test/node_modules/node-zopfli/lib/binding/node-v51-linux-x64' (1)
npm WARN enoent ENOENT: no such file or directory, open '/tmp/node-zopfli-test/package.json'
npm WARN node-zopfli-test No description
npm WARN node-zopfli-test No repository field.
npm WARN node-zopfli-test No README data
npm WARN node-zopfli-test No license field.
npm ERR! Linux 4.10.12-1-MANJARO
npm ERR! argv "/home/antti/.nvm/versions/node/v7.9.0/bin/node" "/home/antti/.nvm/versions/node/v7.9.0/bin/npm" "install" "node-zopfli"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! node-zopfli@2.0.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-zopfli@2.0.2 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-zopfli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-zopfli
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-zopfli
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/antti/.npm/_logs/2017-05-05T05_13_12_409Z-debug.log
Awezome commented 7 years ago

same here

jangot commented 7 years ago

Me too

artptr commented 7 years ago

Amazon S3 server says:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>AccessDenied</Code>
    <Message>Access Denied</Message>
    <RequestId>B621E6983B3000F5</RequestId>
    <HostId>tgb3cxhm00YPzsYqaA/KKCzS0icOCjgNfrOG0LCMIOmR/D/Ch3I6bP2mSgyGj4r3FpeJF6hLO3M=</HostId>
</Error>
Severenit commented 7 years ago

Eeee.... same here!

ryoya-fujimoto commented 7 years ago

same here

zephinzer commented 7 years ago

any updates on this?

Teddy-Zhu commented 7 years ago

how can i resolve the problem? anyone had some good ideas

pierreinglebert commented 5 years ago

I think it's fixed in the new published v2.0.3

apaatsio commented 5 years ago

It works now but I'm not sure if it has to do with node-zopfli because now even npm install node-zopfli@2.0.2 works for me. Although, I'm running on a slightly different setup than two years ago when I originally reported this.