rewyllys
2014-Dec-23 20:20 UTC
[R] Unable to install ggplot2; using R 3.1.2 and RStudio 0.98.1091 in Linux Mint 17.1
My attempts to install and then load ggplot2 have repeatedly failed. Here is the pertinent set of commands and responses: ----------------------------------------------------------------------------------------- install.packages("ggplot2") Installing package into ?/home/ron/R/x86_64-pc-linux-gnu-library/3.1? (as ?lib? is unspecified) also installing the dependencies ?Rcpp?, ?plyr?, ?reshape2?, ?scales? trying URL 'http://cran.stat.ucla.edu/src/contrib/Rcpp_0.11.3.tar.gz' Content type 'application/x-tar' length 2169583 bytes (2.1 Mb) opened URL =================================================downloaded 2.1 Mb trying URL 'http://cran.stat.ucla.edu/src/contrib/plyr_1.8.1.tar.gz' Content type 'application/x-tar' length 393233 bytes (384 Kb) opened URL =================================================downloaded 384 Kb trying URL 'http://cran.stat.ucla.edu/src/contrib/reshape2_1.4.1.tar.gz' Content type 'application/x-tar' length 34693 bytes (33 Kb) opened URL =================================================downloaded 33 Kb trying URL 'http://cran.stat.ucla.edu/src/contrib/scales_0.2.4.tar.gz' Content type 'application/x-tar' length 40093 bytes (39 Kb) opened URL =================================================downloaded 39 Kb trying URL 'http://cran.stat.ucla.edu/src/contrib/ggplot2_1.0.0.tar.gz' Content type 'application/x-tar' length 2351447 bytes (2.2 Mb) opened URL =================================================downloaded 2.2 Mb * installing *source* package ?Rcpp? ... ** package ?Rcpp? successfully unpacked and MD5 sums checked ** libs g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Date.cpp -o Date.o /bin/bash: g++: command not found make: *** [Date.o] Error 127 ERROR: compilation failed for package ?Rcpp? * removing ?/home/ron/R/x86_64-pc-linux-gnu-library/3.1/Rcpp? Warning in install.packages : installation of package ?Rcpp? had non-zero exit status ERROR: dependency ?Rcpp? is not available for package ?plyr? * removing ?/home/ron/R/x86_64-pc-linux-gnu-library/3.1/plyr? Warning in install.packages : installation of package ?plyr? had non-zero exit status ERROR: dependencies ?plyr?, ?Rcpp? are not available for package ?reshape2? * removing ?/home/ron/R/x86_64-pc-linux-gnu-library/3.1/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/ron/R/x86_64-pc-linux-gnu-library/3.1/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/ron/R/x86_64-pc-linux-gnu-library/3.1/ggplot2? Warning in install.packages : installation of package ?ggplot2? had non-zero exit status The downloaded source packages are in ?/tmp/Rtmp3phwN2/downloaded_packages? ---------------------------------------------------------------------------------------------------- I am relatively new to using R, but have had no prior problems in installing packages. Any and all suggestions and comments will be much appreciated. -- View this message in context: http://r.789695.n4.nabble.com/Unable-to-install-ggplot2-using-R-3-1-2-and-RStudio-0-98-1091-in-Linux-Mint-17-1-tp4701054.html Sent from the R help mailing list archive at Nabble.com.
Sarah Goslee
2014-Dec-23 21:13 UTC
[R] Unable to install ggplot2; using R 3.1.2 and RStudio 0.98.1091 in Linux Mint 17.1
Hi, It's not an R problem: you don't have the necessary tools installed in linux, specifically g++ You'll need to install the development tools for your version of linux, as it states in the Rcpp FAQ. Google should help you figure out what you need, if you don't already know how to find and install packages for Mint linux. Sarah On Tue, Dec 23, 2014 at 3:20 PM, rewyllys <wyllys at ischool.utexas.edu> wrote:> My attempts to install and then load ggplot2 have repeatedly failed. > > Here is the pertinent set of commands and responses: > > ----------------------------------------------------------------------------------------- > install.packages("ggplot2") > Installing package into ?/home/ron/R/x86_64-pc-linux-gnu-library/3.1? > (as ?lib? is unspecified) > also installing the dependencies ?Rcpp?, ?plyr?, ?reshape2?, ?scales? > > trying URL 'http://cran.stat.ucla.edu/src/contrib/Rcpp_0.11.3.tar.gz' > Content type 'application/x-tar' length 2169583 bytes (2.1 Mb) > opened URL > =================================================> downloaded 2.1 Mb > > trying URL 'http://cran.stat.ucla.edu/src/contrib/plyr_1.8.1.tar.gz' > Content type 'application/x-tar' length 393233 bytes (384 Kb) > opened URL > =================================================> downloaded 384 Kb > > trying URL 'http://cran.stat.ucla.edu/src/contrib/reshape2_1.4.1.tar.gz' > Content type 'application/x-tar' length 34693 bytes (33 Kb) > opened URL > =================================================> downloaded 33 Kb > > trying URL 'http://cran.stat.ucla.edu/src/contrib/scales_0.2.4.tar.gz' > Content type 'application/x-tar' length 40093 bytes (39 Kb) > opened URL > =================================================> downloaded 39 Kb > > trying URL 'http://cran.stat.ucla.edu/src/contrib/ggplot2_1.0.0.tar.gz' > Content type 'application/x-tar' length 2351447 bytes (2.2 Mb) > opened URL > =================================================> downloaded 2.2 Mb > > * installing *source* package ?Rcpp? ... > ** package ?Rcpp? successfully unpacked and MD5 sums checked > ** libs > g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 > -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security > -D_FORTIFY_SOURCE=2 -g -c Date.cpp -o Date.o > /bin/bash: g++: command not found > make: *** [Date.o] Error 127 > ERROR: compilation failed for package ?Rcpp? > * removing ?/home/ron/R/x86_64-pc-linux-gnu-library/3.1/Rcpp? > Warning in install.packages : > installation of package ?Rcpp? had non-zero exit status > ERROR: dependency ?Rcpp? is not available for package ?plyr? > * removing ?/home/ron/R/x86_64-pc-linux-gnu-library/3.1/plyr? > Warning in install.packages : > installation of package ?plyr? had non-zero exit status > ERROR: dependencies ?plyr?, ?Rcpp? are not available for package ?reshape2? > * removing ?/home/ron/R/x86_64-pc-linux-gnu-library/3.1/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/ron/R/x86_64-pc-linux-gnu-library/3.1/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/ron/R/x86_64-pc-linux-gnu-library/3.1/ggplot2? > Warning in install.packages : > installation of package ?ggplot2? had non-zero exit status > > The downloaded source packages are in > ?/tmp/Rtmp3phwN2/downloaded_packages? > > ---------------------------------------------------------------------------------------------------- > I am relatively new to using R, but have had no prior problems in installing > packages. > > Any and all suggestions and comments will be much appreciated. > > >-- Sarah Goslee http://www.functionaldiversity.org
rewyllys
2014-Dec-26 17:48 UTC
[R] Unable to install ggplot2; using R 3.1.2 and RStudio 0.98.1091 in Linux Mint 17.1
@Sarah Goslee, Many thanks for your excellent help. It's a measure of my inexperience with R (and with compiling in Linux) that I failed to recognize the significance of the g++ error message, and that I was previously unaware that g++ is a (the?) GNU compiler for C++. After adding g++ to my desktop, I had no trouble in installing ggplot2, which is running just fine for me now. Thanks again. Ron Wyllys -- View this message in context: http://r.789695.n4.nabble.com/Unable-to-install-ggplot2-using-R-3-1-2-and-RStudio-0-98-1091-in-Linux-Mint-17-1-tp4701054p4701129.html Sent from the R help mailing list archive at Nabble.com.