Skip to content

Installation: Fedora and other RPM based distributions

Zach Bjornson edited this page Jul 7, 2018 · 3 revisions

Applies to Fedora 18, CentOS 6, CentOS 7 and other RPM-based distributions

⚠️ CentOS Users: CentOS ships with an ancient version of Cairo that isn't supported by node-canvas 2.x. When you attempt to install, you will see warnings about CAIRO_FORMAT_RGB16_565 and/or CAIRO_FORMAT_INVALID. You either need to upgrade to Cairo >=1.2 or use the prebuilt module (see Installation - Prebuilt)

Installing dependencies

$ sudo yum install gcc-c++ cairo-devel libjpeg-turbo-devel pango-devel giflib-devel

Installing node-canvas

$ npm install canvas

Fonts

As on all operating systems, you may need to install fonts.

yum search arial
yum install liberation-sans-fonts.noarch
Clone this wiki locally