November 4, 2022
error: Cannot find cairo.h

Introduction When installing cairo package for R the following error might be thrown: configure: error: Cannot find cairo.h! Please install cairo (http://www.cairographics.org/) and/or set CAIRO_CFLAGS/LIBS correspondingly. The error is generated because cairo.h header file is missing. Follow the steps below to solve this issue on Ubuntu. Solution Installing libcairo2-dev package will solve the problem, because