我尝试在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包时,我遇到了以下错误:
我已经检查了 /tmp/RtmprETcPh/downloaded_packages 目录,只有一个名为 Cairo_1.5-9.tar.gz 的文件。我不知道如何找到 config.log 文件以获取编译简单 Cairo 程序的更多详细信息。
如果有人知道如何解决这个问题,请帮我解决一下。
谢谢。
然而,在安装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 程序的更多详细信息。
如果有人知道如何解决这个问题,请帮我解决一下。
谢谢。
sudo apt install r-cran-cairo
-- 此命令是 bionic 的一部分,您可以在此处查看。 - Dirk Eddelbuettelr-cran-cairo
后,您就不需要再安装该软件包了。它将成为您的 R 安装的一部分! - Ralf Stubnersudo apt install r-cran-cairo
。 - user10252534/usr/lib/R/site-library/Cairo
,但我的项目访问了/usr/local/lib/opencpu/site-library
和/opt/conda/lib/R/library
。 - user10252534