Skip to content
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

Install sharp on Raspberry Pi #324

Closed
nschwa opened this issue Dec 18, 2015 · 8 comments
Closed

Install sharp on Raspberry Pi #324

nschwa opened this issue Dec 18, 2015 · 8 comments
Labels

Comments

@nschwa
Copy link

nschwa commented Dec 18, 2015

Hello,
is there a way to install sharp on a Raspberry Pi (raspian jessie)?
When trying to npm install sharp I get the following errormessage.
My npm-version is: 1.4.21
I ran the preinstall-script as described here
Is this a specific problem with sharp or a general one.
Thank you for suggestions, what a non Linuxexpert like me can do to fix it.
All the best
Schwaddi

@lovell
Copy link
Owner

lovell commented Dec 18, 2015

Hello, proper ARM support should arrive as part of #312.

I did manage to manually install libvips and most of its dependencies on a first generation Pi sometime last year, but it was't totally straightforward.

What is/was the output of running the following?

curl -s https://raw.githubusercontent.com/lovell/sharp/master/preinstall.sh | sudo bash -

@nschwa
Copy link
Author

nschwa commented Dec 18, 2015

Hi @lovell,

What is/was the output of running the following?
curl -s https://raw.githubusercontent.com/lovell/sharp/master/preinstall.sh | sudo bash -

I can't say I ran it last night :). I'll repeat it and report the output.
Edit: Running the script again says: Found libvips 7.40.6

Thanks so far
Schwaddi

@lovell
Copy link
Owner

lovell commented Dec 18, 2015

I'll need to update that script to install libvips v8.1.0 from source on Jessie-based systems (as they only provide 7.40.6 via apt-get); leave it with me.

You should be able to use sharp v0.11.4 for now.

Thanks for reporting this!

@nschwa
Copy link
Author

nschwa commented Dec 18, 2015

@lovell thanks for your help. Installation of sharp v0.11.4 worked perfect.

lovell added a commit that referenced this issue Dec 23, 2015
Debian-based systems must compile from source
@lovell
Copy link
Owner

lovell commented Dec 23, 2015

Commit 6d62051 should enforce the installation of libvips v8.1.1 and therefore allow the use of sharp v0.12.x on Raspbian Jessie systems.

Are you able to test this? It would be great to add documented support for Raspberry Pis in time for Christmas :)

@nschwa
Copy link
Author

nschwa commented Dec 29, 2015

It's a bit late for Christmas, but today I was able to test the installation of sharp on a brand new Raspberry Pi 2 running Raspbian Jessie.

  • Running the preinstall script worked and installed libvips 8.1.1
  • Trying to npm install sharp resulted in an error concerning node-gyp rebuild
  • so I did apt-get remove nodejs and followed these instructions to install latest node-arm
  • after a reboot npm install sharp worked like a charm

Thx @lovell for your support

@lovell
Copy link
Owner

lovell commented Jan 1, 2016

Great news, thanks for confirming.

If you'd be interested in sharp providing a pre-compiled libvips for the ARM architecture, please subscribe to #312 - we may require testers!

@lovell lovell closed this as completed Jan 1, 2016
@alicenq
Copy link

alicenq commented Apr 10, 2018

If anyone is still having issues I was able to get it to work after much headache. Running raspbian gnu/linux 9.4 on a pi 3

npm version 5.6.0
node version 9.10.1

sudo npm install n -g --save
sudo apt remove node --purge
sudo apt install node-gym
sudo n stable

** Make sure you are the owner of ~, this was the cause of a bunch of cryptic messages for me
** If you aren't, sudo chown -R ~

npm install sharp --build-from-source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants