On 11/28/22 23:33, Gene Leynes wrote:
Thanks. Not sure how I ended up on 40 instead of 42.

After deleting the 40 version and installing the 42 version, the 42
installer seemed to create path variables for 40. I just edited that
however and the jsonlite test worked.

Rtools42 is not creating variables for Rtools40, so that shouldn't be the cause.

You can have Rtools40 and Rtools42 both installed on the machine (if needed, e.g. for older versions of R).

I do think that it would be advisable to tell users to check the path and
explain what result is desired there. Many users would benefit from knowing
that they need R's executables and the RTools bin on their path and that
they can add them via the *user *environment variables, which saves them
from needing administrative permission (and is better anyway for system

However, it's less important now that I see that the installer handles it
for you.

Right, the paths don't have to be set manually when using the defaults. For other cases, please see



Thank you again.

On Mon, Nov 28, 2022 at 3:54 PM Simon Urbanek <simon.urba...@r-project.org>


I believe you have the wrong page - the link you listed is for an old
version of R (4.0-4.1) - the current one (for 4.2.x) is



On 29/11/2022, at 7:39 AM, Gene Leynes <gley...@gmail.com> wrote:


I installed git bash for windows, R, RStudio, and R Tools on a fresh
Windows 10 machine.

I followed the directions for RTools:

I added RTools to my user path, but I was getting an error when
installing jsonlite from source (even though it could find "make"
correctly). So, I tried the .Renviron method, and that didn't work
I was getting errors like this:

install.packages("jsonlite", type = "source")
--- Please select a CRAN mirror for use in this session ---
trying URL '
Content type 'application/x-gzip' length 1053099 bytes (1.0 MB)
downloaded 1.0 MB

* installing *source* package 'jsonlite' ...
** package 'jsonlite' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc  -I"C:/Users/XXXXXXX/AppData/Local/Programs/R/R-42~1.2/include"
-DNDEBUG -Iyajl/api
-D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2
-mstackrealign  -c base64.c -o base64.o
sh: line 1: gcc: command not found
make: *** [C:/Users/ XXXXXXX
base64.o] Error 127
ERROR: compilation failed for package 'jsonlite'
* removing

The downloaded source packages are in
        ‘C:\Users\ XXXXXXX
Warning message:
In install.packages("jsonlite", type = "source") :
  installation of package ‘jsonlite’ had non-zero exit status

I can't reproduce this part, but at one point it said that gcc wasn't
in C:\rtools40\mingw_64\bin (not sure where the underscore was, but it
an underscore)

I noticed that my folder is named C:\rtools40\mingw64\bin

That gave me the idea to add C:\rtools40\mingw64\bin to my user path
resolved the issues. Adding that to the path allowed me to compile from
source, etc. Fixed RStudio and the R GUI (whatever we call it now).

TLDR: I think there's a bug in the installer or something that creating
incompatible path name with an underscore, or the instructions are
the advice to add C:\rtools40\mingw{WIN}\bin to the path.

Somewhat related:

By the way, I think adding RTools to the user path is the superior option
for Windows users, and I would like to propose an edit to that

First, it will help avoid complications for users who may
experience different paths for ~ depending on network availability.

Second, it is a more standard way to edit the path and helps users learn
what's going on with the path and makes R less of a mysterious "exception
to the rule". No other program uses ~/.Renviron to edit the path.

Although it's worth mentioning the option to create ~/.Renviorn, it
shouldn't be the primary instruction.

Would it be possible to create a pull request for those edits? I don't
where that documentation is maintained.

Thank you, and I hope you all are doing well.

       [[alternative HTML version deleted]]

R-devel@r-project.org mailing list

        [[alternative HTML version deleted]]

R-devel@r-project.org mailing list

R-devel@r-project.org mailing list

Reply via email to