1

这适用于我的 MAC,但现在我需要安装在运行 RHEL8 的 ppc64le 上。我用谷歌搜索了答案,但没有找到任何可以帮助我确定解决方案的东西。谁能给我一些关于如何解决这个问题的指导?

操作系统:红帽企业 Linux 8.0 (Ootpa)

内核:Linux 4.18.0-80.el8.ppc64le

gcc 版本 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC)

yarn install v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/3] ⠄ dtrace-provider
[2/3] ⠄ sharp
error /home/flame/auth-server/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments: 
Directory: /home/flame/auth-server/node_modules/sharp
Output:
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-ppc64.tar.gz
/home/flame/auth-server/node_modules/sharp/install/libvips.js:85
          throw new Error(`Status ${response.statusCode}`);
          ^

Error: Status 404
    at /home/flame/auth-server/node_modules/sharp/install/libvips.js:85:17
    at f (/home/flame/auth-server/node_modules/once/once.js:25:25)
    at ClientRequest.<anonymous> (/home/flame/auth-server/node_modules/simple-get/index.js:63:5)
    at Object.onceWrapper (events.js:300:26)
    at ClientRequest.emit (events.js:210:5)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:583:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:115:17)
    at TLSSocket.socketOnData (_http_client.js:456:22)
    at TLSSocket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:308:12)
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@12.13.0 | linux | ppc64
gyp info find Python using Python version 2.7.15 found at "/usr/bin/python2"
gyp info spawn /usr/bin/python2
gyp info spawn args [
gyp info spawn args   '/home/flame/.nvm/versions/node/v12.13.0/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   '/home/flame/auth-server/node_modules/sharp/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/flame/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/flame/.cache/node-gyp/12.13.0/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/flame/.cache/node-gyp/12.13.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/flame/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/flame/.cache/node-gyp/12.13.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/flame/auth-server/node_modules/sharp',
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 args ]
gyp info spawn make
make: Entering directory '/home/flame/auth-server/node_modules/sharp/build'
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
../src/common.cc:25:10: fatal error: vips/vips8: No such file or directory
 #include <vips/vips8>
          ^~~~~~~~~~~~
compilation terminated.
make: *** [sharp.target.mk:137: Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory '/home/flame/auth-server/node_modules/sharp/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/flame/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.18.0-80.el8.ppc64le
gyp ERR! command "/home/flame/.nvm/versions/node/v12.13.0/bin/node" "/home/flame/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/flame/auth-server/node_modules/sharp
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
4

1 回答 1

0

第一个失败是它尝试下载 sharp-libvips 源代码压缩包:

info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-ppc64.tar.gz
[...]
Error: Status 404

...这看起来是因为sharp-libvips 项目没有为 ppc64 架构提供版本(在https://github.com/lovell/sharp-libvips/releases/tag/v8.8.1)。

也许您可以要求该项目为 ppc64 提供构建?

于 2020-03-11T07:28:46.120 回答