我尝试在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程序的编译细节。
如果有人知道如何解决此问题,请帮助我解决此问题。
谢谢
答案 0 :(得分:0)
您可能需要安装x11开发库,因为docker容器可能未运行这些库。 尝试
sudo apt-get install libx11-dev