安装包“png"在 R/ubuntu 中 [英] Install package "png" in R/ubuntu

查看:64
本文介绍了安装包“png"在 R/ubuntu 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(在 ubuntu 下),我尝试:

(Under ubuntu), I try:

install.packages("png")

并得到:

** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/kaveh/R/x86_64-pc-linux-gnu-library/3.2/png/libs/png.so':
  libpng16.so.16: cannot open shared object file: No such file or directory

我认为它必须与 libpng 过时有关,但我已经从 此链接 使用:

I thought it has to due with libpng being obselete but I have already installed it from this link using:

./configure 
make check
make install

所以我真的不知道该怎么办了~

so I don't really know what more to do~

推荐答案

为了从源代码构建,您可能缺少 libpng* 标头.在我的机器上,我安装了 libpng12-dev 包.确保您也拥有它,然后再次尝试安装 png.

You may be missing the libpng* headers in order to build from source. On my machine(s), I have package libpng12-dev installed. Ensure you have it too, and then try installing png again.

还要注意

R> capabilities()["png"]
 png 
TRUE 
R> 

所以你的默认 R 版本应该已经能够创建 png 文件了.

so your default build of R should already have the ability to create png files.

这篇关于安装包“png"在 R/ubuntu 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆