-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sharp cannot detect globally installed libvips (Apple M1) #3239
Comments
Is there any way to force Sharp to use globally installed libvips? libvips was installed using homebrew as follows. $ which vips
/opt/homebrew/bin/vips
$ vips --version
vips-8.12.2-Tue Jan 25 09:34:32 UTC 2022
$ pkg-config --modversion vips-cpp
8.12.2
$ brew info vips
vips: stable 8.12.2 (bottled)
Image processing library
https://github.com/libvips/libvips
/opt/homebrew/Cellar/vips/8.12.2_2 (165 files, 13.7MB) *
Poured from bottle on 2022-05-26 at 11:30:48
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/vips.rb
License: LGPL-2.1-or-later
==> Dependencies
Build: pkg-config ✔
Required: cairo ✔, cfitsio ✔, cgif ✔, fftw ✔, fontconfig ✔, freetype ✔, gdk-pixbuf ✔, gettext ✔, glib ✔, harfbuzz ✔, hdf5 ✔, imagemagick ✔, imath ✔, jpeg-xl ✔, libexif ✔, libgsf ✔, libheif ✔, libimagequant ✔, libmatio ✔, libpng ✔, librsvg ✔, libspng ✔, libtiff ✔, libxml2 ✔, little-cms2 ✔, mozjpeg ✔, openexr ✔, openjpeg ✔, openslide ✔, orc ✔, pango ✔, poppler ✔, webp ✔
==> Analytics
install: 7,677 (30 days), 28,276 (90 days), 101,966 (365 days)
install-on-request: 7,544 (30 days), 27,645 (90 days), 98,164 (365 days)
build-error: 0 (30 days) |
Please can you provide the output of the following command: brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2 (There was a recent change in the way Homebrew paths are determined, which might be causing this.) |
Thanks for the quick reply! It is: $ brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2
/usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/12 |
Thank you, that looks OK to me. Please can you provide the output of the following command:
|
Sure! The result is:
And below is the full list of
|
Thank you, I think I know what's causing this. Are you able to use the previous sharp v0.30.4 as a workaround for now? |
|
v0.30.6 now available with the fix for this so you can now upgrade, thanks for reporting. |
I believe it's a dependency of gatsby lovell/sharp#3239
OK, I debugging this file But when I copy that code and run in my console, it shows: Shall I try the arm64 version's node? |
Finally, I update the node version to arm64, and everything works fine! what did i do: confirm the platform: arch there output then It will install the 19.3.0 in my machine, and then use it as default. After that, rerun |
Possible install-time or require-time problem
npm install
is the same as the architecture and platform of Node.js used at runtime.Are you using the latest version of sharp?
sharp
as reported bynpm 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.Is this a problem with filesystem permissions?
If you are using npm v6 or earlier and installing as a
root
orsudo
user, have you tried with thenpm install --unsafe-perm
flag?If you are using npm v7 or later, does the user running
npm install
own the directory it is run in?If you are using the
ignore-scripts
feature ofnpm
, have you tried with thenpm install --ignore-scripts=false
flag?What is the complete output of running
npm install --verbose --foreground-scripts sharp
in an empty directory?What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?The text was updated successfully, but these errors were encountered: