unable to install Cairo package under linux
Asked Answered
T

2

3

I locally download the package and atempt to install it but I get this error:

    R CMD INSTALL -l /usr/local/lib64/R/library Cairo_1.5-1.tar.gz

I get his error:

   checking for PNG support in Cairo... yes
   checking for ATS font support in Cairo... no
    configure: CAIRO_LIBS=-L/usr/local/lib -lcairo
    checking for library containing deflate... no
     checking whether Cairo programs can be compiled... configure: error: Cannot     
    compile a simple Cairo program. See config.log for details.
    ERROR: configuration failed for package 'Cairo'
   * removing '/usr/local/lib64/R/library/Cairo'

any ideas? thanks

Tournai answered 24/2, 2012 at 20:2 Comment(7)
I assume because you don't have libcairo2 installed? But you could check config.log for details it would seem. Also, you might get more descriptive error messages if you install from within R using install.packages('Cairo')Urbanism
when I tried to install it withing R, the same error. libcairo2 is not installed. my server does not have any internet connection, do you know where I can get this libcairo2 to locally installed.Tournai
here ...Urbanism
so... why doesn't that work? download it to your machine, scp it to the server and away you go!Urbanism
I do see lots of them for ubuntu and debian but couln't find anything for centos. really frustrating.Tournai
Sounds like a good question for a Centos forum! Sorry I can't be of more help, but you're closer to solving the problem!Urbanism
As mentioned in a previous comment, the error tells you to see config.log for details. This looks like a good first move to find a more detailed (and probably more useful as well) error message.Dramatist
S
6

I managed to install Cairo on R for linux (version 3.0.2) by first installing the libcairo2 package from terminal:

    sudo apt-get install libcairo2-dev

Then, open R and install Cairo using

    install.packages("Cairo")
Snowfield answered 28/3, 2014 at 14:10 Comment(1)
I know this answer is old, but still relevant; you need to ensure you know what package manager you are using and look up the distribution version of the cairo dev package (ie likely to be something else on non debian based Linux system, Red Hat rpm package is cairo-devel)Norbertonorbie
T
1

I had to install x11 libraries for Linux and was able to compile Cairo.

Tournai answered 9/3, 2012 at 19:47 Comment(3)
can you give a little more detail, what libraries did you need to install?Acquah
On macOS, I needed to run brew install libxt (libXt is X Toolkit Intrinsicts).Tiro
As per this post, apt-get install libxt-dev should sort it on Debian/Ubuntu.Pycno

© 2022 - 2024 — McMap. All rights reserved.