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

转自:http://blog.csdn.net/earl211/article/details/48224939

我在ubuntu14.04上安装ggplot2的时候出现一下错误:

[plain]  view plain copy print ?
  1. ERROR: dependency ‘plyr’ is not available for package ‘reshape2’  
  2. * removing ‘/home/wq/R/x86_64-pc-linux-gnu-library/3.0/reshape2’  
  3. Warning in install.packages :  
  4.   installation of package ‘reshape2’ had non-zero exit status  
  5. ERROR: dependency ‘plyr’ is not available for package ‘scales’  
  6. * removing ‘/home/wq/R/x86_64-pc-linux-gnu-library/3.0/scales’  
  7. Warning in install.packages :  
  8.   installation of package ‘scales’ had non-zero exit status  
  9. ERROR: dependencies ‘plyr’, ‘reshape2’, ‘scales’ are not available for package ‘ggplot2’  
  10. * removing ‘/home/wq/R/x86_64-pc-linux-gnu-library/3.0/ggplot2’  
  11. Warning in install.packages :  
  12.   installation of package ‘ggplot2’ had non-zero exit status  
  13.   
  14. The downloaded source packages are in  
  15.     ‘/tmp/RtmpgbMDf6/downloaded_packages’  
从头看,原来是plyr包没有安装,接下来安装plyr包,有
[plain]  view plain copy print ?
  1. ERROR: dependency ‘plyr’ is not available for package ‘reshape2’  
  2. * removing ‘/home/wq/R/x86_64-pc-linux-gnu-library/3.0/reshape2’  
  3. Warning in install.packages :  
  4.   installation of package ‘reshape2’ had non-zero exit status  
  5.   
  6. The downloaded source packages are in  
  7.     ‘/tmp/RtmpgbMDf6/downloaded_packages’  
最后我找到了解决办法,将包下载下来,然后自己安装。

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

[plain]  view plain copy print ?
  1. setwd("/path/where/I/downloaded/the/compressed/file")  
  2. install.packages("plyr", repos=NULL) 
  3. 备注:install.packages()命令的第一个参数应该改成压缩包的名称才能正确安装!!!
  4. intall.packages("r-cran-plyr_1.8.1.orig.tar.gz",repos=NULL) 
ggplot2就通过正常的安装(install.packages("ggplot2")就可以了
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值