r - linux centos 中的 R 基础包 grDevices 中缺少 cairo.so

标签 r linux svg centos cairo

最近在 CentOS 上安装了 R 3.2.4 并尝试通过 R 创建 png 图表时,我收到以下警告:

Warning in (function (filename = if (onefile) "Rplots.svg" else "Rplot%03d.svg", : unable to load shared object '/usr/local/lib64/R/library/grDevices/libs//cairo.so': /usr/local/lib64/R/library/grDevices/libs//cairo.so: cannot open shared object file: No such file or directory Warning in (function (filename = if (onefile) "Rplots.svg" else "Rplot%03d.svg", : failed to load cairo DLL

从网上搜索来看,cairo 似乎需要 X11 才能正常工作,但即使在安装之后我仍然收到警告。还尝试从 R 安装 Cairo 包,但也没有用。

查看了grDevices下的libs文件夹,确认没有cairo.so。

据我所知,这应该包含在 R 的安装中,但我没有看到它。有人知道我做错了什么吗?

最佳答案

在使用 source 在 Ubuntu 14.04 中安装 R 3.5.0 并评估 rmakrdown::render 后,我收到了几乎相同的警告消息。

我也没有 cairo.so 并且出现错误。

在我使用 --with-cario 重新安装之后

./configure --with-cairo --with-x && \
make && \
sudo make install 

现在我有了 cairo.so

关于r - linux centos 中的 R 基础包 grDevices 中缺少 cairo.so,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36414236/

相关文章:

r - R中序列的索引组合

r - 检查某个元素是否存在于另一个向量中并打印其值

r - 选择特定数字后的 n 行

d3.js - 限制元素的移动,当我们拖动它时

CSS 'd' <路径> 属性在 Firefox 中不起作用

评估两个(纬度、经度)点之间的视线 (LOS) 的 R 代码

linux - 在 linux 中使用给定的字符串对文件进行排序

php - wordpress中的文件写入问题

regex - linux删除某个目录的方法

javascript - 你好。我尝试单击 div 的所有元素,但现在可以了