简体   繁体   English

R Cairo 包安装在 Ubuntu 18.04 中失败

[英]R Cairo package installation failed in Ubuntu 18.04

I attempt to install Cairo package in R under a Docker Ubuntu 18.04 container.我尝试在 Docker Ubuntu 18.04 容器下的 R 中安装 Cairo 包。 Before installing the R Cairo package, I installed these packets in Ubuntu: libgtk2.0-dev, libcairo2-dev, xvfb, xauth, xfonts-base, r-base-dev, and libxt-dev.在安装 R Cairo 包之前,我在 Ubuntu 中安装了这些包:libgtk2.0-dev、libcairo2-dev、xvfb、xauth、xfonts-base、r-base-dev 和 libxt-dev。

However, when I installed Cairo package in R, I got the following error:但是,当我在 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

I've checked /tmp/RtmprETcPh/downloaded_packages, and there is only a filed called Cairo_1.5-9.tar.gz.我检查过/tmp/RtmprETcPh/downloaded_pa​​ckages,只有一个名为Cairo_1.5-9.tar.gz 的文件。 And I don't know where to find config.log for more compile details of compiling a simple Cairo program.而且我不知道在哪里可以找到 config.log 以获取有关编译简单开罗程序的更多编译细节。

Please help me to resolve out this issue if anybody know how to resolve out this issue.如果有人知道如何解决此问题,请帮助我解决此问题。

Thank you谢谢

You may need to install the x11 dev libs since the docker container is likely not running these. 您可能需要安装x11 dev库,因为docker容器可能未运行这些库。 Try 尝试

sudo apt-get install libx11-dev

Under ubuntu 20.04, after installing libx11-dev, trying to install Cairo gave the error X11/Intrinsic.h not found.在 ubuntu 20.04 下,安装 libx11-dev 后,尝试安装 Cairo 出现错误 X11/Intrinsic.h not found。 This is in libxt-dev.这是在 libxt-dev 中。 After installing this, Cairo could be installed.安装后,就可以安装开罗了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM