gpt4 book ai didi

node.js - 在 Ubuntu 20.04.2 LTS 上安装 node-gyp 重建失败

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

我正在尝试在可视代码中运行一个项目,但是每当我 npm install 都会导致这个 npm-gyp 错误,我已经安装了最新版本的 Node 、npm、python,我还安装了 python 2.7 并且没有任何效果,我已经安装了组件要领,甚至是 pip。

user@ubuntu:~/testeGit/testeGitHub$ npm install
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

> sharp@0.18.4 install /home/user/testeGit/testeGitHub/node_modules/sharp
> node-gyp rebuild

ERROR: https://dl.bintray.com/lovell/sharp/libvips-8.5.5-linux-x64.tar.gz status code 403
gyp: Call to 'node -e "require('./binding').download_vips()"' returned exit status 1 while in 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 (/usr/share/nodejs/node-gyp/lib/configure.js:355:16)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.8.0-59-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/user/testeGit/testeGitHub/node_modules/sharp
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN integradaBibliotecaV2@2.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.18.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.18.4 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/user/.npm/_logs/2021-06-25T01_34_27_616Z-debug.log
日志:
Log_File_Here

最佳答案

node_modules/sharp 构建失败。您使用的操作系统显然没有为此 Node 包预构建的二进制文件。
https://sharp.pixelplumbing.com/install
按照构建说明进行操作,特别是请参阅 libvips 部分。
您可能还想尝试更新您的软件包(您使用的是 0.18.4,而最新的是 0.28.3),如
https://dl.bintray.com/lovell/sharp/libvips-8.5.5-linux-x64.tar.gz
正在返回 403 Forbidden错误,这意味着作者更改了链接,或者该主机不再托管它,或者可能没有将其分享给公众。

关于node.js - 在 Ubuntu 20.04.2 LTS 上安装 node-gyp 重建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68124467/

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