yum install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g ++


2

Я пытаюсь установить https://npmjs.org/package/canvas ,

Я следую этому руководству: https://github.com/LearnBoost/node-canvas/wiki/Installation---Ubuntu ,

С:

yum install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g ++

И / или:

yum install libcairo2-devel libjpeg8-devel libpango1.0-devel libgif-devel build-essential g ++

Пытался:

yum clean all

Попробовал еще раз:

[root@vps ~]# yum install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: centos.serverspace.co.uk
 * extras: mirrors.coreix.net
 * updates: centos.serverspace.co.uk
base                                                                                                                                     | 1.1 kB     00:00     
base/primary                                                                                                                             | 1.2 MB     00:00     
base                                                                                                                                                  3641/3641
extras                                                                                                                                   | 2.1 kB     00:00     
extras/primary_db                                                                                                                        | 188 kB     00:00     
updates                                                                                                                                  | 1.9 kB     00:00     
updates/primary_db                                                                                                                       | 540 kB     00:00     
virtualmin                                                                                                                               | 1.2 kB     00:00     
virtualmin/primary                                                                                                                       |  59 kB     00:00     
virtualmin-universal                                                                                                                     | 1.2 kB     00:00     
virtualmin-universal/primary                                                                                                             |  21 kB     00:00     
vz-base                                                                                                                                  |  951 B     00:00     
vz-base/primary                                                                                                                          | 1.7 kB     00:00     
vz-base                                                                                                                                                     5/5
vz-updates                                                                                                                               |  951 B     00:00     
vz-updates/primary                                                                                                                       | 1.0 kB     00:00     
vz-updates                                                                                                                                                  3/3
Setting up Install Process
No package libcairo2-dev available.
No package libjpeg8-dev available.
No package libpango1.0-dev available.
No package libgif-dev available.
No package build-essential available.
No package g++ available.
Nothing to do

Что я делаю неправильно?

Fedora Install

[root@vps ~]# su -c 'yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel'
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.serverspace.co.uk
 * extras: mirrors.coreix.net
 * updates: centos.serverspace.co.uk
Setting up Install Process
No package cairomm-devel available.
No package libjpeg-turbo-devel available.
No package pangomm available.
No package pangomm-devel available.
Resolving Dependencies
--> Running transaction check
---> Package cairo.i386 0:1.2.4-5.el5 set to be updated
---> Package cairo.x86_64 0:1.2.4-5.el5 set to be updated
---> Package cairo-devel.i386 0:1.2.4-5.el5 set to be updated
---> Package cairo-devel.x86_64 0:1.2.4-5.el5 set to be updated
---> Package pango.i386 0:1.14.9-8.el5.centos.3 set to be updated
---> Package pango.x86_64 0:1.14.9-8.el5.centos.3 set to be updated
---> Package pango-devel.i386 0:1.14.9-8.el5.centos.3 set to be updated
---> Package pango-devel.x86_64 0:1.14.9-8.el5.centos.3 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved 
=================================================
Installing:
 cairo          i386               394 k
 cairo          x86_64             386 k
 cairo-devel    i386               131 k
 cairo-devel    x86_64             130 k
 pango          i386               334 k
 pango          x86_64             338 k
 pango-devel    i386               275 k
 pango-devel    x86_64             276 k

Transaction Summary
=================================================
Install       8 Package(s)
Upgrade       0 Package(s)

Total download size: 2.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): cairo-devel-1.2.4-5.el5.x86_64.rpm                                                                                                                    | 130 kB     00:00     
(2/8): cairo-devel-1.2.4-5.el5.i386.rpm                                                                                                                      | 131 kB     00:00     
(3/8): pango-devel-1.14.9-8.el5.centos.3.i386.rpm                                                                                                            | 275 kB     00:00     
(4/8): pango-devel-1.14.9-8.el5.centos.3.x86_64.rpm                                                                                                          | 276 kB     00:00     
(5/8): pango-1.14.9-8.el5.centos.3.i386.rpm                                                                                                                  | 334 kB     00:00     
(6/8): pango-1.14.9-8.el5.centos.3.x86_64.rpm                                                                                                                | 338 kB     00:00     
(7/8): cairo-1.2.4-5.el5.x86_64.rpm                                                                                                                          | 386 kB     00:00     
(8/8): cairo-1.2.4-5.el5.i386.rpm                                                                                                                            | 394 kB     00:00     
--------------------------------------------------
Total                                                                                                                                                  6.1 MB/s | 2.2 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
 Installing     : cairo                                                                                                                                                            1/8 
  Installing     : cairo                                                                                                                                                        2/8 
  Installing     : pango                                                                                                                                                        3/8 
  Installing     : cairo-devel                                                                                                                                                  4/8 
  Installing     : pango-devel                                                                                                                                                  5/8 
  Installing     : cairo-devel                                                                                                                                                  6/8 
  Installing     : pango                                                                                                                                                        7/8 
  Installing     : pango-devel                                                                                                                                                  8/8 

Installed:
  cairo.i386 0:1.2.4-5.el5                cairo.x86_64 0:1.2.4-5.el5                cairo-devel.i386 0:1.2.4-5.el5                cairo-devel.x86_64 0:1.2.4-5.el5               
  pango.i386 0:1.14.9-8.el5.centos.3      pango.x86_64 0:1.14.9-8.el5.centos.3      pango-devel.i386 0:1.14.9-8.el5.centos.3      pango-devel.x86_64 0:1.14.9-8.el5.centos.3     

Complete!
[root@vps ~]# npm install canvas
npm http GET https://registry.npmjs.org/canvas
npm http 304 https://registry.npmjs.org/canvas

> canvas@1.0.3 install /root/node_modules/canvas
> node-gyp rebuild

 make: Entering directory `/root/node_modules/canvas/build'

 CXX(target) Release/obj.target/canvas/src/Canvas.o
../src/Canvas.cc: In static member function ‘static v8::Handle<v8::Value> Canvas::StreamJPEGSync(const v8::Arguments&)’:
../src/Canvas.cc:369: warning: passing ‘double’ for argument 2 to ‘void write_to_jpeg_stream(cairo_surface_t*, int, int, closure_t*)’
../src/Canvas.cc:369: warning: passing ‘double’ for argument 3 to ‘void write_to_jpeg_stream(cairo_surface_t*, int, int, closure_t*)’
  CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
  CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
  CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.o
../src/CanvasRenderingContext2d.cc: In static member function ‘static   v8::Handle<v8::Value> Context2d::DrawImage(const v8::Arguments&)’:
../src/CanvasRenderingContext2d.cc:639: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:640: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:641: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:642: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:643: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:644: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:645: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:646: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:650: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:651: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:652: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:653: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:657: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:658: warning: converting to ‘int’ from ‘double’
../src/CanvasRenderingContext2d.cc:679: warning: converting to ‘int’ from ‘float’
../src/CanvasRenderingContext2d.cc:680: warning: converting to ‘int’ from ‘float’
../src/CanvasRenderingContext2d.cc: In static member function ‘static void   Context2d::SetShadowBlur(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::AccessorInfo&)’:
../src/CanvasRenderingContext2d.cc:942: warning: converting to ‘int’ from ‘double’
  CXX(target) Release/obj.target/canvas/src/color.o
  CXX(target) Release/obj.target/canvas/src/Image.o
../src/Image.cc: In member function ‘cairo_status_t Image::loadGIFFromBuffer(uint8_t*, unsigned int)’:
../src/Image.cc:602: error: ‘cairo_format_stride_for_width’ was not declared in this scope
../src/Image.cc: In member function ‘cairo_status_t    Image::decodeJPEGIntoSurface(jpeg_decompress_struct*)’:
../src/Image.cc:716: error: ‘cairo_format_stride_for_width’ was not declared in this   scope
make: *** [Release/obj.target/canvas/src/Image.o] Error 1
make: Leaving directory `/root/node_modules/canvas/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit    (/root/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:786:12)
gyp ERR! System Linux 2.6.32-042stab065.3
gyp ERR! command "node" "/root/local/lib/node_modules/npm/node_modules/node-    gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/canvas
gyp ERR! node -v v0.10.3
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok 
npm ERR! canvas@1.0.3 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the canvas@1.0.3 install script.
npm ERR! This is most likely a problem with the canvas 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 canvas
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.32-042stab065.3
npm ERR! command "node" "/root/local/bin/npm" "install" "canvas"
npm ERR! cwd /root
npm ERR! node -v v0.10.3
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm ERR! not ok code 0

Это руководство предназначено для Ubuntu (и других систем на основе Debian с apt-getи вы не используете Ubuntu. Найдите руководство для вашей системы. apt-get а также yum используйте совершенно разные пакеты, а имена не совпадают.
Darth Android

у них есть следующие руководства: Установка Amazon Linux AMI (EC2) Установка Fedora Установка no.de Установка OSX Установка Ubuntu Установка Windows Установка Heroku. как узнать какая у меня система на сервере?
Ben Muircroft

Но какую систему вы используете?
Darth Android

как мне узнать? я на Mac я использую Unix SSH терминал VPS Server Cpannel это все, что я знаю
Ben Muircroft

в: список yum ... я нахожу 3 пакета: libjpeg.i386 6b-37 база libjpeg-devel.i386 6b-37 база libjpeg-devel.x86_64
Ben Muircroft

Ответы:


8

Это руководство для Ubuntu, а вы не используете Ubuntu. Попробуйте руководство по Fedora, если у вас есть yum:

su -c 'yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel'
npm install canvas

Источник


посмотрите мои правки после попытки Fedora ^ вверху
Ben Muircroft

@BenMuircroft Вы не можете использовать apt-get пакеты с yum, Используйте пакеты, которые я перечислил в своем ответе.
Darth Android

я набрал твой ответ в терминал: su -c 'yum установить Каир Каир-Девел Cairomm-Devel Libjpeg-Turbo-Devel Pango Pango-Devel Pangomm Pangomm-Devel' Npm Установить холст
Ben Muircroft

cairomm-devel (отсутствует), libjpeg-turbo-devel (отсутствует), pangomm (отсутствует), pangomm-devel (отсутствует)
Ben Muircroft

@BenMuircroft: попробуйте установить зависимости вручную.
stderr
Используя наш сайт, вы подтверждаете, что прочитали и поняли нашу Политику в отношении файлов cookie и Политику конфиденциальности.
Licensed under cc by-sa 3.0 with attribution required.