通过conda安装cairo后安装R cairo包

时间:2016-01-04 02:08:24

标签: r cairo conda

我正在尝试为R安装Cairo软件包。我没有服务器的管理员权限,因此我通过conda软件包管理器conda install -c https://conda.anaconda.org/anaconda cairo安装了Cairo。我在我的主目录中编译了R源代码。 我试图将以下内容添加到我的bashrc中:

export CAIRO_LIBS=-L${HOME}/miniconda/pkgs/cairo-1.12.18-6/lib/cairo/
export CAIRO_CFLAGS=-I${HOME}/miniconda/pkgs/cairo-1.12.18-6/include/cairo/

当我尝试install.packages('Cairo')时,我收到以下错误:

configure: CAIRO_CFLAGS=-I/N/u/jfreimer/Mason/miniconda/pkgs/cairo-1.12.18-6/include/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=-L/N/u/jfreimer/Mason/miniconda/pkgs/cairo-1.12.18-6/lib/cairo/
checking for library containing deflate... -lz
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 ‘/N/home/j/f/jfreimer/Mason/R/lib64/R/library/Cairo’

Anaconda有一个C包的cairo(https://anaconda.org/r/r-cairo)所以我需要的所有依赖项都可以通过conda安装。但是,我正在尝试使用我安装的独立R而不是conda R,因为我在conda R中遇到了其他软件包的问题。我想知道是否有人有任何建议

1 个答案:

答案 0 :(得分:0)

尝试:

R -e "install.packages('cairo')" --configure-vars=
"CAIRO_CFLAGS=/PATH_TO_CAIRO/include/cairo;
 CAIRO_LIBS=/PATH_TO_CAIRO/lib/cairo"

这项工作适合我。