gpt4 book ai didi

node.js - 严重错误 : Package OpenEXR was not found in the pkg-config search path

转载 作者:行者123 更新时间:2023-12-04 12:13:55 28 4
gpt4 key购买 nike

我执行了 npm install在 Mac 上的 gatsby js 目录中。

  • macOs 是大苏尔
  • 版本是 11.4。
  • Gatsby 版本是 3.11.0
  • gatsby-plugin-sharp 版本是 3.11.0

  • 显示此错误日志。
    npm ERR! code 1
    npm ERR! path /Users/<username>/<path>/node_modules/sharp
    npm ERR! command failed
    npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
    npm ERR! sharp: Detected globally-installed libvips v8.11.2
    npm ERR! sharp: Building from source via node-gyp
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp info using node-gyp@7.1.2
    npm ERR! gyp info using node@15.14.0 | darwin | x64
    npm ERR! gyp info find Python using Python version 3.7.0 found at "/Users/<username>/.pyenv/versions/3.7.0/bin/python3"
    npm ERR! gyp info spawn /Users/<username>/.pyenv/versions/3.7.0/bin/python3
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args '/Users/<username>/.nodebrew/node/v15.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
    npm ERR! gyp info spawn args 'binding.gyp',
    npm ERR! gyp info spawn args '-f',
    npm ERR! gyp info spawn args 'make',
    npm ERR! gyp info spawn args '-I',
    npm ERR! gyp info spawn args '/Users/<username>/<path>/blog/node_modules/sharp/build/config.gypi',
    npm ERR! gyp info spawn args '-I',
    npm ERR! gyp info spawn args '/Users/<username>/.nodebrew/node/v15.14.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    npm ERR! gyp info spawn args '-I',
    npm ERR! gyp info spawn args '/Users/<username>/Library/Caches/node-gyp/15.14.0/include/node/common.gypi',
    npm ERR! gyp info spawn args '-Dlibrary=shared_library',
    npm ERR! gyp info spawn args '-Dvisibility=default',
    npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/<username>/Library/Caches/node-gyp/15.14.0',
    npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/<username>/.nodebrew/node/v15.14.0/lib/node_modules/npm/node_modules/node-gyp',
    npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/<username>/Library/Caches/node-gyp/15.14.0/<(target_arch)/node.lib',
    npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/<username>/<path>/blog/node_modules/sharp',
    npm ERR! gyp info spawn args '-Dnode_engine=v8',
    npm ERR! gyp info spawn args '--depth=.',
    npm ERR! gyp info spawn args '--no-parallel',
    npm ERR! gyp info spawn args '--generator-output',
    npm ERR! gyp info spawn args 'build',
    npm ERR! gyp info spawn args '-Goutput_dir=.'
    npm ERR! gyp info spawn args ]
    npm ERR! Package OpenEXR was not found in the pkg-config search path.
    npm ERR! Perhaps you should add the directory containing `OpenEXR.pc'
    npm ERR! to the PKG_CONFIG_PATH environment variable
    npm ERR! Package 'OpenEXR', required by 'vips', not found
    npm ERR! gyp: Call to 'PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/11::/usr/local/opt/libffi/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" pkg-config --cflags-only-I vips-cpp vips glib-2.0 | sed s\/-I//g' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
    npm ERR! gyp ERR! configure error
    npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
    npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/<username>/.nodebrew/node/v15.14.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
    npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:369:20)
    npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
    npm ERR! gyp ERR! System Darwin 20.5.0
    npm ERR! gyp ERR! command "/Users/<username>/.nodebrew/node/v15.14.0/bin/node" "/Users/<username>/.nodebrew/node/v15.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    npm ERR! gyp ERR! cwd /Users/<username>/<path>/blog/node_modules/sharp
    npm ERR! gyp ERR! node -v v15.14.0
    npm ERR! gyp ERR! node-gyp -v v7.1.2
    npm ERR! gyp ERR! not ok
    我试过 brew reinstall vips但错误没有被重新解决。有人知道这是什么吗?

    最佳答案

    IDK 为什么但 ilmbase 和 OpenEXR 有冲突的链接。
    这对我有用。

    brew install openexr
    brew unlink ilmbase
    brew link openexr
    brew install imath
    brew link imath

    关于node.js - 严重错误 : Package OpenEXR was not found in the pkg-config search path,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68710308/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com