ITADN

Could not load the "sharp" module using the linux-x64 runtime - Unsupported CPU: Prebuilt binaries for linux-x64 require v2 microarchitecture

#4507Closedeliasrudberg 创建于 2026-03-15
installation
E
eliasrudbergcommented
<!-- Please try to answer as many of these questions as possible. --> ## Possible install-time or require-time problem <!-- Please place an [x] in the box to confirm. --> - [x] I have read and understood all of the [documentation relating to installation](https://sharp.pixelplumbing.com/install). - [x] I have searched for known bugs relating to this problem in my choice of package manager. You must confirm both of these before continuing. ### Are you using the latest version of sharp? <!-- Please place an [x] in the box to confirm. --> - [x] I am using the latest version of `sharp` as reported by `npm view sharp dist-tags.latest`. If you cannot confirm this, please upgrade to the latest version and try again before opening an issue. If you are using another package which depends on a version of `sharp` that is not the latest, please open an issue against that package instead. ### Are you using a supported runtime? <!-- Please place an [x] in the relevant box to confirm. --> - [x] I am using Node.js with a version that satisfies `^18.17.0 || ^20.3.0 || >=21.0.0` - [ ] I am using Deno - [ ] I am using Bun If you cannot confirm any of these, please upgrade to the latest version and try again before opening an issue. ### Are you using a supported package manager and installing optional dependencies? <!-- Please place an [x] in the relevant box to confirm. --> - [x] I am using npm >= 10.1.0 with `--include=optional` - [ ] I am using yarn >= 3.2.0 - [ ] I am using pnpm >= 7.1.0 with `--no-optional=false` - [ ] I am using Deno - [ ] I am using Bun If you cannot confirm any of these, please upgrade to the latest version of your chosen package manager and ensure you are allowing the installation of optional or multi-platform dependencies before opening an issue. ### What is the complete error message, including the full stack trace? <!-- Please provide the error message and stack trace here. --> ``` eliastest1@nc3:~/test4$ node -e "require('sharp')" /home/eliastest1/node_modules/sharp/lib/sharp.js:120 throw new Error(help.join('\n')); ^ Error: Could not load the "sharp" module using the linux-x64 runtime Unsupported CPU: Prebuilt binaries for linux-x64 require v2 microarchitecture Possible solutions: - Ensure optional dependencies can be installed: npm install --include=optional sharp - Ensure your package manager supports multi-platform installation: See https://sharp.pixelplumbing.com/install#cross-platform - Add platform-specific dependencies: npm install --os=linux --cpu=x64 sharp - Consult the installation documentation: See https://sharp.pixelplumbing.com/install at Object.<anonymous> (/home/eliastest1/node_modules/sharp/lib/sharp.js:120:9) at Module._compile (node:internal/modules/cjs/loader:1705:14) at Object..js (node:internal/modules/cjs/loader:1838:10) at Module.load (node:internal/modules/cjs/loader:1441:32) at Function._load (node:internal/modules/cjs/loader:1263:12) at TracingChannel.traceSync (node:diagnostics_channel:328:14) at wrapModuleLoad (node:internal/modules/cjs/loader:237:24) at Module.require (node:internal/modules/cjs/loader:1463:12) at require (node:internal/modules/helpers:147:16) at Object.<anonymous> (/home/eliastest1/node_modules/sharp/lib/constructor.js:10:1) Node.js v22.22.1 ``` ### What is the complete output of running `npm install --verbose --foreground-scripts sharp` in an empty directory? ``` eliastest1@nc3:~/test5$ npm install --verbose --foreground-scripts sharp npm verbose cli /usr/bin/node /usr/bin/npm npm info using npm@10.9.4 npm info using node@v22.22.1 npm verbose title npm install sharp npm verbose argv "install" "--loglevel" "verbose" "--foreground-scripts" "sharp" npm verbose logfile logs-max:10 dir:/home/eliastest1/.npm/_logs/2026-03-15T10_55_24_254Z- npm verbose logfile /home/eliastest1/.npm/_logs/2026-03-15T10_55_24_254Z-debug-0.log npm http cache https://registry.npmjs.org/sharp 31ms (cache hit) npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-win32-x64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-win32-ia32 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-win32-arm64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-wasm32 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@emnapi/runtime npm verbose reify failed optional dependency /home/eliastest1/node_modules/tslib npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-linuxmusl-arm64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-linux-s390x npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-linux-riscv64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-linux-ppc64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-linux-arm64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-linux-arm npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-libvips-linuxmusl-arm64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-libvips-linux-s390x npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-libvips-linux-riscv64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-libvips-linux-ppc64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-libvips-linux-arm64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-libvips-linux-arm npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-libvips-darwin-x64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-libvips-darwin-arm64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-darwin-x64 npm verbose reify failed optional dependency /home/eliastest1/node_modules/@img/sharp-darwin-arm64 npm http cache tslib@https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz 0ms (cache hit) npm http cache @emnapi/runtime@https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.0.tgz 0ms (cache hit) npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 282ms up to date, audited 9 packages in 1s 5 packages are looking for funding run `npm fund` for details found 0 vulnerabilities npm verbose cwd /home/eliastest1/test5 npm verbose os Linux 6.8.0-106-generic npm verbose node v22.22.1 npm verbose npm v10.9.4 npm verbose exit 0 npm info ok ``` ### What is the output of running `npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp`? ``` eliastest1@nc3:~/test6$ npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp System: OS: Linux 6.8 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat) CPU: (2) x64 QEMU Virtual CPU version 1.5.3 Memory: 14.73 GB / 15.62 GB Container: Yes Shell: Unknown - /bin/sh Binaries: Node: 22.22.1 - /usr/bin/node Yarn: 1.22.22 - /usr/bin/yarn npm: 10.9.4 - /usr/bin/npm pnpm: 10.29.1 - /usr/bin/pnpm ```
关闭于 2026-03-15 1 条评论