首页 文章

在Ubuntu 18.04中,R Cairo软件包安装失败

提问于
浏览
1

我尝试在Docker Ubuntu 18.04容器下在R中安装Cairo软件包 . 在安装R Cairo软件包之前,我在Ubuntu中安装了这些数据包:libgtk2.0-dev,libcairo2-dev,xvfb,xauth,xfonts-base,r-base-dev和libxt-dev .

但是,当我在R中安装Cairo包时,出现以下错误:

checking if R was compiled with the RConn patch... no
checking cairo.h usability... yes
checking cairo.h presence... yes
checking for cairo.h... yes
checking for PNG support in Cairo... yes
checking for ATS font support in Cairo... no
configure: CAIRO_LIBS=-lfreetype -lz -lpng16 -lz -lcairo -lXext -lXrender -lX11
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 ‘/opt/conda/lib/R/library/Cairo’

The downloaded source packages are in
    ‘/tmp/RtmprETcPh/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("Cairo") :
  installation of package ‘Cairo’ had non-zero exit status

我检查了/ tmp / RtmprETcPh / downloaded_packages,并且只有一个名为Cairo_1.5-9.tar.gz的文件 . 我不知道在哪里可以找到config.log来获取编译简单的Cairo程序的更多编译细节 .

如果有人知道如何解决这个问题,请帮我解决这个问题 .

谢谢

1 回答

  • 0

    您可能需要安装x11 dev libs,因为docker容器可能没有运行这些 . 尝试

    sudo apt-get install libx11-dev
    

相关问题