Unable to install ggplot2 on windows 10 and R 3.5

Hello,

I have spent the whole day yesterday googling the solutions and tried all those suggested but the problem persists. Below is the error message. Your help is greatly appreciated.

trying URL 'https://cran.revolutionanalytics.com/src/contrib/ggplot2_3.3.2.tar.gz'
Content type 'application/octet-stream' length 3054431 bytes (2.9 MB)
downloaded 2.9 MB

  • installing source package 'xfun' ...
    ** package 'xfun' successfully unpacked and MD5 sums checked
    ** libs

*** arch - i386
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'xfun'

  • removing 'C:/R/R-3.5.0/library/xfun'
    In R CMD INSTALL
  • installing source package 'ggplot2' ...
    ** package 'ggplot2' successfully unpacked and MD5 sums checked
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** inst
    ** byte-compile and prepare package for lazy loading
    Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    there is no package called 'colorspace'
    ERROR: lazy loading failed for package 'ggplot2'
  • removing 'C:/R/R-3.5.0/library/ggplot2'
    In R CMD INSTALL
    ERROR: dependency 'xfun' is not available for package 'tinytex'
  • removing 'C:/R/R-3.5.0/library/tinytex'
    In R CMD INSTALL
    ERROR: dependency 'xfun' is not available for package 'knitr'
  • removing 'C:/R/R-3.5.0/library/knitr'
    In R CMD INSTALL
    ERROR: dependencies 'knitr', 'tinytex', 'xfun' are not available for package 'rmarkdown'
  • removing 'C:/R/R-3.5.0/library/rmarkdown'
    In R CMD INSTALL

The downloaded source packages are in
‘C:\Users\zhangx\AppData\Local\Temp\RtmpWs1KwW\downloaded_packages’
Warning messages:
1: In install.packages("ggplot2", dependencies = TRUE, INSTALL_opts = c("--no-lock")) :
installation of package ‘xfun’ had non-zero exit status
2: In install.packages("ggplot2", dependencies = TRUE, INSTALL_opts = c("--no-lock")) :
installation of package ‘ggplot2’ had non-zero exit status
3: In install.packages("ggplot2", dependencies = TRUE, INSTALL_opts = c("--no-lock")) :
installation of package ‘tinytex’ had non-zero exit status
4: In install.packages("ggplot2", dependencies = TRUE, INSTALL_opts = c("--no-lock")) :
installation of package ‘knitr’ had non-zero exit status
5: In install.packages("ggplot2", dependencies = TRUE, INSTALL_opts = c("--no-lock")) :
installation of package ‘rmarkdown’ had non-zero exit status

Joanie

The first error says you don't have make, which means you don't have Rtools installed (and if you do, it's not on system PATH).

Thank you. I have a library (C:\R\R-3.5.0\library) which contains a bunch of packages. How to fix it? What do you mean system path?

You need to install Rtools, this is not an R package but a separate software that you can download from here (RTools35 for your R version).

https://cran.r-project.org/bin/windows/Rtools/history.html

1 Like

In addition to the answer, you asked about System PATH. This is an environment variable that has a list of "paths" that the operating system accesses to ascertain the location of installed applications. It is what enables us to to launch a program from any point in the directory tree. So, when you install a program, the location of its executables is added to this variable. Some installers will do this for you and some others expect you to do it yourself.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.