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

ld: library not found for -ljpeg #80

Closed
volatilegg opened this issue Aug 18, 2014 · 6 comments
Closed

ld: library not found for -ljpeg #80

volatilegg opened this issue Aug 18, 2014 · 6 comments

Comments

@volatilegg
Copy link

Hi I got this error" ld: library not found for -ljpeg " . Could you please help me solve the problem?

node-gyp rebuild

CXX(target) Release/obj.target/sharp/src/sharp.o
SOLINK_MODULE(target) Release/sharp.node
ld: library not found for -ljpeg
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/sharp.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/doduc/Desktop/aidbrella-git/backend/node_modules/sharp
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR! sharp@0.5.2 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.5.2 install script.
npm ERR! This is most likely a problem with the sharp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls sharp
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "sharp"
npm ERR! cwd /Users/doduc/Desktop/aidbrella-git/backend
npm ERR! node -v v0.10.30
npm ERR! npm -v 2.0.0-alpha-5
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/doduc/Desktop/aidbrella-git/backend/npm-debug.log
npm ERR! not ok code 0

@lovell
Copy link
Owner

lovell commented Aug 18, 2014

Hi @volatilegg, please can you try brew unlink jpeg then brew link jpeg before trying again.

@lovell lovell added the triage label Aug 18, 2014
@volatilegg
Copy link
Author

I tried but It stills showed the same error :(

@volatilegg
Copy link
Author

I tried run this command:
"xcode-select --install"
and the problem is gone.
Thanks you :)

@lovell
Copy link
Owner

lovell commented Aug 18, 2014

Thanks for the update @volatilegg, glad to hear you got it working.

I've added your advice to the Mac installation instructions in the README as others have reported a similar problem previously.

@tommycarstensen
Copy link

What is the solution to this issue in 2020? Thanks.

@lovell
Copy link
Owner

lovell commented Apr 17, 2020

@tommycarstensen Please open a new installation issue at https://github.com/lovell/sharp/issues/new?labels=installation&template=installation.md ensuring all questions are answered.

Repository owner locked and limited conversation to collaborators Apr 17, 2020
@lovell lovell removed the triage label Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants