我试图用可视化代码运行一个项目,但每当我安装npm时,都会导致这个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无法构建。您使用的操作系统显然没有为该节点包预先构建的二进制文件。
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
错误,这意味着作者已经更改了链接,或者该主机不再托管链接,或者可能没有向公众共享链接。