Reputation: 135
I'm using R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
While trying to install ggplot2 on R, I'm getting the following errors:
install.packages("ggplot2")
Installing package into ‘/home/alex/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning: dependencies ‘MASS’, ‘plyr’ are not available
also installing the dependency ‘reshape2’
trying URL 'http://cran.sciserv.eu/src/contrib/reshape2_1.4.1.tar.gz'
Content type 'application/x-gzip' length 34693 bytes (33 Kb)
opened URL
==================================================
downloaded 33 Kb
trying URL 'http://cran.sciserv.eu/src/contrib/ggplot2_1.0.1.tar.gz'
Content type 'application/x-gzip' length 2351203 bytes (2.2 Mb)
opened URL
==================================================
downloaded 2.2 Mb
* installing *source* package ‘reshape2’ ...
** package ‘reshape2’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/home/alex/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/include" -fpic -O3 -pipe -g -c RcppExports.cpp -o RcppExports.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/alex/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/include" -fpic -O3 -pipe -g -c melt.cpp -o melt.o
g++ -shared -o reshape2.so RcppExports.o melt.o -L/usr/lib/R/lib -lR
installing to /home/alex/R/x86_64-pc-linux-gnu-library/3.0/reshape2/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘plyr’ 1.8 is being loaded, but >= 1.8.1 is required
ERROR: lazy loading failed for package ‘reshape2’
* removing ‘/home/alex/R/x86_64-pc-linux-gnu-library/3.0/reshape2’
ERROR: dependencies ‘reshape2’, ‘MASS’ are not available for package ‘ggplot2’
* removing ‘/home/alex/R/x86_64-pc-linux-gnu-library/3.0/ggplot2’
The downloaded source packages are in
‘/tmp/RtmpIesHFE/downloaded_packages’
Warning messages:
1: In install.packages("ggplot2") :
installation of package ‘reshape2’ had non-zero exit status
2: In install.packages("ggplot2") :
installation of package ‘ggplot2’ had non-zero exit status
>
can someone please help in resolving these errors? I googled and tried to installed dependencies already, but nothing seems to work. Thanks in advance.
Upvotes: 1
Views: 2354
Reputation: 2409
I've got almost the exact same setup as you and:
install.packages("plyr", repos="http://cran.rstudio.com/")
install.packages("ggplot2", repos="http://cran.rstudio.com/")
worked alright for me. Give it a shot, and if it still doesn't work, try another mirror:
install.packages("plyr", repos="http://cran.cnr.Berkeley.edu/")
install.packages("ggplot2", repos="http://cran.cnr.Berkeley.edu/")
Upvotes: 1