您的位置:首页 > 大数据 > 人工智能

R包的安装错误ERROR: dependency ‘plyr’ is not available for package ‘reshape2’

2015-09-05 14:15 393 查看
我在ubuntu14.04上安装ggplot2的时候出现一下错误:

ERROR: dependency ‘plyr’ is not available for package ‘reshape2’
* removing ‘/home/wq/R/x86_64-pc-linux-gnu-library/3.0/reshape2’
Warning in install.packages :
installation of package ‘reshape2’ had non-zero exit status
ERROR: dependency ‘plyr’ is not available for package ‘scales’
* removing ‘/home/wq/R/x86_64-pc-linux-gnu-library/3.0/scales’
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependencies ‘plyr’, ‘reshape2’, ‘scales’ are not available for package ‘ggplot2’
* removing ‘/home/wq/R/x86_64-pc-linux-gnu-library/3.0/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpgbMDf6/downloaded_packages’
从头看,原来是plyr包没有安装,接下来安装plyr包,有
ERROR: dependency ‘plyr’ is not available for package ‘reshape2’
* removing ‘/home/wq/R/x86_64-pc-linux-gnu-library/3.0/reshape2’
Warning in install.packages :
installation of package ‘reshape2’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpgbMDf6/downloaded_packages’
最后我找到了解决办法,将包下载下来,然后自己安装。

去这个网站https://launchpad.net/ubuntu/vivid/+package/r-cran-plyr下载r-cran-plyr包,通过如下代码安装:

setwd("/path/where/I/downloaded/the/compressed/file")
install.packages("plyr", repos=NULL)
ggplot2就通过正常的安装(install.packages("ggplot2")就可以了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: