skip to Main Content

I’ve been using R with ggplot2 and other packages on my Linux CentOS 7 for a long time.
Today, all of a sudden, it stopped working.

When I call the png() function in my script, it generates the following errrors:

Warning messages:
1: In png(heatmap_file) :
  unable to load shared object '/usr/lib64/R/library/grDevices/libs//cairo.so':
  /lib64/libcairo.so.2: undefined symbol: FT_Get_Var_Design_Coordinates
2: In png(heatmap_file) : failed to load cairo DLL

I tried to update the cairo package many times but nothing worked out so far.
What can I do?

Thanks!

2

Answers


  1. Chosen as BEST ANSWER

    I found a solution and I am going to share it with the community.

    I am working on a Dell Latitude 3540 laptop running Linux CentOS 7 operating system (centos-release-7-3.1611.el7.centos.x86_64).

    I ran sudo yum -y update and I understood there was a duplication issue regarding the freetype package, which was installed twice, and some other packages that were having conflicts.

    I then removed the old freetype package and the conflicting packages with this command:

    rpm -e freetype-2.4.11-12.el7.i686 --nodeps
    rpm -e conflicting-package-1 --nodeps
    rpm -e conflicting-package-2 --nodeps
    ...
    

    Then I updated all the packages I manually removed:

    sudo yum -y update freetype
    sudo yum -y conflicting-package-1 freetype
    sudo yum -y conflicting-package-2 freetype
    ...
    

    This method worked out for me; I hope it might be helpful to someone.


  2. Your version of cairo (/lib64/libcairo.so.2) depends on a function called FT_Get_Var_Design_Coordinates. This function should come from FreeType. However, your version of libfreetype.so seems to be older and does not have this symbol. So, either you explicitly installed an older version, or “something” comes with an older version of FreeType.

    I would look for files called libfreetype.so and check if they have the necessary symbol

    I’m on Debian testing and here I get (this means that my version of FreeType does have this symbol; you would get no output if the symbol is not available):

    $ nm -s -D /usr/lib/x86_64-linux-gnu/libfreetype.so | grep FT_Get_Var_Design_Coordinates                                                                           
    000000000001d260 T FT_Get_Var_Design_Coordinates
    

    For you, based on the path to libcairo.so, I would expect something like /lib64/libfreetype.so to be the path to check.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search