Comments (14)
+1
from node-images.
Same here, though for me it failed on Jpeg.o:
CXX(target) Release/obj.target/images/src/Jpeg.o
../src/Jpeg.cc:14:10: fatal error: 'jpeglib.h' file not found
#include <jpeglib.h>
^
1 error generated.
I'm guessing certain native libs are required? The binding.gyp mentions something called libjpeg-turbo.
from node-images.
need install turbojpeg
you can brew install jpeg-turbo
install it.
from node-images.
Does brew install jpeg-turbo
work for you? @akhoury
from node-images.
I've installed jpeg-turbo, but still fail to install images:
ijsetekiMacBook-Pro:Workspace ijse$ npm install images
npm http GET https://registry.npmjs.org/images
npm http 304 https://registry.npmjs.org/images
> [email protected] install /Users/ijse/Workspace/node_modules/images
> node install.js
xcode-select: Error: No Xcode is selected. Use xcode-select -switch <path-to-xcode>, or see the xcode-select manpage (man xcode-select) for further information.
Traceback (most recent call last):
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp", line 18, in <module>
sys.exit(gyp.main(sys.argv[1:]))
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in main
return gyp_main(args)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 508, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2105, in GenerateOutput
part_of_all=qualified_target in needed_targets)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 769, in Write
self.Pchify))
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1154, in WriteSources
cflags = self.xcode_settings.GetCflags(configname)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 260, in GetCflags
sdk_root = self._SdkPath()
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 247, in _SdkPath
return os.path.join(self._GetSdkBaseDir(),
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 234, in _GetSdkBaseDir
raise Exception('Error %d running xcode-select' % job.returncode)
Exception: Error 2 running xcode-select
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:415:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 12.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/ijse/Workspace/node_modules/images
gyp ERR! node -v v0.10.8
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
from node-images.
@ijse 多谢,看样子是你的 xcode 环境配置有问题。
xcode-select: Error: No Xcode is selected. Use xcode-select -switch <path-to-xcode>, or see the xcode-select manpage (man xcode-select) for further information.
能用node-gyp编译其他C++扩展库吗?
from node-images.
@zhangyuanwei 装了xcode和command line什么的,, 接着装:
···
npm http GET https://registry.npmjs.org/images
npm http 304 https://registry.npmjs.org/images
[email protected] install /Users/ijse/Workspace/node_modules/images
node install.js
CXX(target) Release/obj.target/images/src/Image.o
CXX(target) Release/obj.target/images/src/Png.o
../src/Png.cc:10:10: fatal error: 'png.h' file not found
#include <png.h>
^
1 error generated.
make: *** [Release/obj.target/images/src/Png.o] 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.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 12.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/ijse/Workspace/node_modules/images
gyp ERR! node -v v0.10.8
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
···
from node-images.
@ijse 已经成功编译一个.o文件了:
CXX(target) Release/obj.target/images/src/Image.o
编译Png.o的时候报错了,看样子缺少头文件,
../src/Png.cc:10:10: fatal error: 'png.h' file not found
非win32平台需要 giflib,jpeg-turbo,libpng,没有用过Mac,不过应该是类似brew install libpng
来安装?
from node-images.
@zhangyuanwei 嗯 嗯 ,, 今天来公司在Linux下试了下,也报这个错:
make: Entering directory `/home/webadmin/workspace/imgen/node_modules/images/build'
CXX(target) Release/obj.target/images/src/Image.o
CXX(target) Release/obj.target/images/src/Png.o
../src/Png.cc:10:17: 警告:png.h:没有那个文件或目录
../src/Png.cc:23: 错误:变量或字段 ‘read_from_memory’ 声明为 void
../src/Png.cc:23: 错误:‘png_structp’ 在此作用域中尚未声明
../src/Png.cc:23: 错误:‘png_bytep’ 在此作用域中尚未声明
../src/Png.cc:23: 错误:‘png_size_t’ 在此作用域中尚未声明
../src/Png.cc:23: 错误:initializer 表达式列表被看作复合表达式
../src/Png.cc:23: 错误:expected ‘,’ or ‘;’ before ‘{’ token
make: *** [Release/obj.target/images/src/Png.o] 错误 1
make: Leaving directory `/home/webadmin/workspace/imgen/node_modules/images/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/webadmin/prog/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:255:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Linux 2.6.18-194.el5
gyp ERR! command "node" "/home/webadmin/prog/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/webadmin/workspace/imgen/node_modules/images
gyp ERR! node -v v0.8.18
gyp ERR! node-gyp -v v0.8.2
gyp ERR! not ok
npm ERR! [email protected] install: `node install.js`
npm ERR! `sh "-c" "node install.js"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the images package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls images
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.18-194.el5
npm ERR! command "/home/webadmin/prog/node/bin/node" "/home/webadmin/prog/node/bin/npm" "install" "images"
npm ERR! cwd /home/webadmin/workspace/imgen
npm ERR! node -v v0.8.18
npm ERR! npm -v 1.2.2
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/webadmin/workspace/imgen/npm-debug.log
npm ERR! not ok code 0
from node-images.
CXX(target) Release/obj.target/images/src/Image.o
CXX(target) Release/obj.target/images/src/Png.o
CXX(target) Release/obj.target/images/src/Jpeg.o
../src/Jpeg.cc:73:26: error: use of undeclared identifier 'JCS_EXT_RGBA'
cinfo.out_color_space = JCS_EXT_RGBA;
^
../src/Jpeg.cc:121:25: error: use of undeclared identifier 'JCS_EXT_RGBA'
cinfo.in_color_space = JCS_EXT_RGBA;
^
2 errors generated.
make: *** [Release/obj.target/images/src/Jpeg.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node/0.8.20/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:255:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.8.20/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/meekohi/aball.web/spin-transcoder/node_modules/images
gyp ERR! node -v v0.8.20
gyp ERR! node-gyp -v v0.8.4
gyp ERR! not ok
npm ERR! [email protected] install: `node install.js`
npm ERR! `sh "-c" "node install.js"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the images package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls images
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.4.0
npm ERR! command "/usr/local/Cellar/node/0.8.20/bin/node" "/usr/local/bin/npm" "update"
npm ERR! cwd /Users/meekohi/aball.web/spin-transcoder
npm ERR! node -v v0.8.20
npm ERR! npm -v 1.2.11
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/meekohi/aball.web/spin-transcoder/npm-debug.log
npm ERR! not ok code 0
from node-images.
I have same problem as @Meekohi
from node-images.
- make sure you've installed xcode command line tool
- remove ~/.node-gyp and try install node-images again
- try update your node to v0.10.23
Good Luck!
ps: if still fail, try gm
from node-images.
I also got the same problem as @Meekohi . Can any one give some solutions?
from node-images.
I install images , but it is have two question .
it is this
barcode npm install images
npm http GET https://registry.npmjs.org/images
npm http 304 https://registry.npmjs.org/images
[email protected] install /Users/zhangzhao/Desktop/node/node_modules/images
node install.js
CXX(target) Release/obj.target/images/src/Image.o
CXX(target) Release/obj.target/images/src/Png.o
CXX(target) Release/obj.target/images/src/Jpeg.o
../src/Jpeg.cc:73:26: error: use of undeclared identifier 'JCS_EXT_RGBA'
cinfo.out_color_space = JCS_EXT_RGBA;
^
../src/Jpeg.cc:121:25: error: use of undeclared identifier 'JCS_EXT_RGBA'
cinfo.in_color_space = JCS_EXT_RGBA;
^
2 errors generated.
make: *** [Release/obj.target/images/src/Jpeg.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node/0.10.25/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Darwin 13.1.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.25/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/zhangzhao/Desktop/node/node_modules/images
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! [email protected] install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the images package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls images
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.1.0
npm ERR! command "/usr/
from node-images.
Related Issues (20)
- 在使用electron 桌面开发的时候,调用imagesAPI出现Buffer报错
- Draw image on negative coordinate
- dyld: lazy symbol binding failed: Symbol not found HOT 1
- dyld[25779]: missing symbol called HOT 5
- macos error HOT 1
- M1 MacBook / Apple Silicon support?
- 原图大小超过2m之后就无法压缩了 HOT 7
- node-gyp rebuild error
- 图片大小超过2M闪退 HOT 1
- 运行代码报错MODULE_NOT_FOUND' HOT 1
- 请问mac M1平台如何自己编译darwin-arm64-binding.node? HOT 3
- 怎么给图片设置透明度 HOT 1
- 有图片裁剪吗
- 怎么使用svg
- node: symbol lookup error: /app/node_modules/images/vendor/linux-x64-binding.node: undefined symbol: _ZN2v87Isolate19CheckMemoryPressureEv HOT 10
- Is it supported base64
- Not found /var/vendor/linux-x64-binding.node
- 希望提供更多平台的binding
- Module still working? HOT 1
- node v20.11.0版本不兼容 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-images.