-
-
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
Cannot install sharp on M1 Mac with Debian Stretch based Docker container #2875
Comments
Hi, did you see https://sharp.pixelplumbing.com/install ?
You'll need to use Debian Buster or later to take advantage of the prebuilt binaries. |
Please see #2837 and lovell/sharp-libvips#114 |
I am currently facing this issue as well. I have no idea what to do next. |
The Debian Buster based images should work e.g. |
I've been facing the issue as well. Tried the buster-based images but it didn't work. Any idea what else to check? |
I meant Debian Bullseye, not Buster, sorry. You could also try Alpine Linux. Eventually this will be solved via lovell/sharp-libvips#114 |
That seems to work now. Any idea what the problem is? Or when or how to overcome this with the base image of Node? Looking forward to your reply. |
I confirm that choosing bullseye variant does help. In my case it was node:lts-bullseye. |
The future sharp v0.30.0 will provide binaries that work with older Linux OS on ARM64 - see #2938 |
I had this problem on Apple M1 Pro. Fixed by changing the version of debian:
|
Thank you!!! This worked for me. I went to bed really upset last night. Not tonight :) |
Changing from |
Thanks |
@quochungphp Can you share your Dockerfile for reference? I am having some issues getting it up and running. |
Did you see the documentation relating to installation?
yes
Have you ensured the architecture and platform of Node.js used for
npm install
is the same as the architecture and platform of Node.js used at runtime?yes
Are you using the latest version? Is the version currently in use as reported by
npm ls sharp
the same as the latest version as reported bynpm view sharp dist-tags.latest
?yes (0.29.0)
If you are using npm v6 or earlier and installing as a
root
orsudo
user, have you tried with thenpm install --unsafe-perm
flag?n/a
If you are using npm v7, does the user running
npm install
own the directory it is run in?n/a
If you are using the
ignore-scripts
feature ofnpm
, have you tried with thenpm install --ignore-scripts=false
flag?no
What is the complete output of running
npm install --verbose sharp
? Have you checked this output for useful error messages?What is the output of running
npx envinfo --binaries --system
?Issue occurs on M1 Mac when I try
yarn install
dependencies (including sharp) on Docker. However it is fine when Iyarn install
locally.What I did is to ensure that I'm using latest sharp 0.29.0. I also installed libvips globally with homebrew. It all works fine if I just yarn install from terminal, however if I go to docker it fails with the following error. To my Dockerfile I also added apt-get libvips but this didn't help.
Any suggestions?
OUTPUT ERROR
DOCKERFILE
The text was updated successfully, but these errors were encountered: