Please Help: error message when installing packages in RStudio


I am unable to install packages in RStudio,

I also downloaded RTools but the installation instructions on CRAN aren't very clear.
Instructions below, not sure how to create the files and where to place them:

(RTools: Toolchains for building R and R packages from source on Windows)

Putting Rtools on the PATH

After installation is complete, you need to perform one more step to be able to compile R packages: you need to put the location of the Rtools make utilities ( bash , make , etc) on the PATH . The easiest way to do so is create a text file .Renviron in your Documents folder which contains the following line:


You can do this with a text editor, or you can even do it from R like so:

writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron")

Now restart R, and verify that make can be found, which should show the path to your Rtools installation.

## "C:\\rtools40\\usr\\bin\\make.exe"

If this works, you can try to install an R package from source:

install.packages("jsonlite", type = "source")

If this succeeds, you’re good to go! See the links below to learn more about rtools40 and the Windows build infrastructure.

I do not see any error in the screen shot you posted. There is a warning but the installation process completes successfully. Try

1 Like

thanks, does the warning message effect anything? Do I need RTools?

No warning messeage never affect your package

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.