无法通过NPM安装LWIP(ZLIB_VERNUM!= PNG_ZLIB_VERNUM)

时间:2017-06-16 11:20:46

标签: npm gulp lwip

通过NPM无法安装LWIP。

lwip用于创建sprity包含sprity包

  • 从日志中读取,它表明我需要更新一些常量(参见下面的代码)。

    In file included from ../src/lib/png/png.c:14:
    ../src/lib/png/pngpriv.h:805:4: error: ZLIB_VERNUM != np "-I (include path) error: see the notes in pngpriv.h"
     error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
      ^
    1 error generated.
    make: *** [Release/obj.target/lwip_decoder/src/lib/png/png.o] Error 1
    
  • 我可能错了,这里是完整的日志。

    MacBook-Pro-2:frontend someuser$ npm install
    npm WARN package.json PIMFC@ No repository field.
    npm WARN package.json PIMFC@ No license field.
    
    > fsevents@1.1.2 install /somepath/node_modules/fsevents
    > node install
    
    [fsevents] Success: "/somepath/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" is installed via remote
    
    > lwip@0.0.9 install /somepath/node_modules/lwip
    > node-gyp rebuild
    
      CXX(target) Release/obj.target/lwip_decoder/src/decoder/init.o
      CXX(target) Release/obj.target/lwip_decoder/src/decoder/util.o
      CXX(target) Release/obj.target/lwip_decoder/src/decoder/buffer_worker.o
    ../src/decoder/buffer_worker.cpp:8:56: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
        _height(0), _channels(0), _trans(false), _metadata("") {
                                                           ^
    1 warning generated.
      CXX(target) Release/obj.target/lwip_decoder/src/decoder/jpeg_decoder.o
      CXX(target) Release/obj.target/lwip_decoder/src/decoder/png_decoder.o
      CXX(target) Release/obj.target/lwip_decoder/src/decoder/gif_decoder.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jmemnobs.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jcomapi.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdapimin.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdapistd.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdatadst.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdatasrc.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdcoefct.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdcolor.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jddctmgr.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdhuff.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdinput.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdmainct.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdmarker.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdmaster.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdpostct.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdsample.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jerror.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jfdctflt.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jfdctfst.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jfdctint.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jidctflt.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jidctfst.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jidctint.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jutils.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jmemmgr.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdarith.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdmerge.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jaricom.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jquant1.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jquant2.o
      CC(target) Release/obj.target/lwip_decoder/src/lib/png/png.o
    In file included from ../src/lib/png/png.c:14:
    ../src/lib/png/pngpriv.h:805:4: error: ZLIB_VERNUM != PNG_ZLIB_VERNUM "-I (include path) error: see the notes in pngpriv.h"
    #  error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
       ^
    1 error generated.
    make: *** [Release/obj.target/lwip_decoder/src/lib/png/png.o] Error 1
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/Users/someuser/.nvm/versions/node/v4.8.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
    gyp ERR! stack     at emitTwo (events.js:87:13)
    gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
    gyp ERR! System Darwin 16.0.0
    gyp ERR! command "/Users/someuser/.nvm/versions/node/v4.8.3/bin/node" "/Users/someuser/.nvm/versions/node/v4.8.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /Users/someuser/Projects/some-project/frontend/node_modules/lwip
    gyp ERR! node -v v4.8.3
    gyp ERR! node-gyp -v v3.4.0
    gyp ERR! not ok
    
    npm ERR! Darwin 16.0.0
    npm ERR! argv "/Users/someuser/.nvm/versions/node/v4.8.3/bin/node" "/Users/someuser/.nvm/versions/node/v4.8.3/bin/npm" "install" "--update-binary"
    npm ERR! node v4.8.3
    npm ERR! npm  v2.15.11
    npm ERR! code ELIFECYCLE
    npm ERR! lwip@0.0.9 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the lwip@0.0.9 install script 'node-gyp rebuild'.
    

0 个答案:

没有答案