[R] Errors in R package installation

Eric Berger er|cjberger @end|ng |rom gm@||@com
Fri Dec 13 07:12:21 CET 2019


And a low-tech approach: how about renaming "C:\Users\David Stevens"
to "C:\Users\DavidStevens" (i.e. remove the blank in the name).
A few years ago I did the equivalent "C:\Program Files" -->
"C:\ProgramFiles" to avoid similar installation problems.

On Thu, Dec 12, 2019 at 9:06 PM Richard M. Heiberger <rmh using temple.edu> wrote:
>
> Directory and file names with embedded blanks frequently don't work on
> WIndows.  Use the 8.3 version of the name.
> Since you were able to get the package onto your machine, you can
> install it from there.
>
> The downloaded source packages are in
>         ‘C:\Users\David
> Stevens\AppData\Local\Temp\Rtmpk5NqrI\downloaded_packages’
>
> In the windows shell
>
> cd c:\Users
> dir /x David*
>
> It will tell you something like
> DavidS~1
>
> Then in R you can write
>
> install.packages("c:/Users/DavidS~1/AppData/Local/Temp/Rtmpk5NqrI/downloaded_packages/callr_3.4-0.tar.gz")
>
> Make sure you use the correct full name of the downloaded source package.
>
> Rich
>
> On Thu, Dec 12, 2019 at 12:03 PM David Stevens <david.stevens using usu.edu> wrote:
> >
> > Thanks Eric - I'll follow up with this link. I'd tried some of these
> > things before but I'll keep after it.
> >
> > Best
> >
> > David
> >
> > On 12/12/2019 9:52 AM, Eric Berger wrote:
> > > Actually there was progress as after it failed it removed the folder
> > > c:/myRlib/callr, which means it had used it. Seems good.
> > > I think you might find the discussion here to be relevant
> > >
> > > https://community.rstudio.com/t/cant-install-package-remotes-when-trying-to-install-devtools/34121
> > >
> > > Good luck,
> > > Eric
> > >
> > > On Thu, Dec 12, 2019 at 6:08 PM David Stevens <david.stevens using usu.edu> wrote:
> > >> Thanks Eric - I had tried this and failed with
> > >>
> > >> install.packages('callr',destdir='c:/myRLib')
> > >> Installing package into ‘C:/myRLib’
> > >> (as ‘lib’ is unspecified)
> > >>
> > >>    There is a binary version available but the source version is
> > >>    later:
> > >>        binary source needs_compilation
> > >> callr  3.3.2  3.4.0             FALSE
> > >>
> > >> installing the source package ‘callr’
> > >>
> > >> trying URL 'https://cloud.r-project.org/src/contrib/callr_3.4.0.tar.gz'
> > >> Content type 'application/x-gzip' length 100129 bytes (97 KB)
> > >> downloaded 97 KB
> > >>
> > >> * installing *source* package 'callr' ...
> > >> ** package 'callr' successfully unpacked and MD5 sums checked
> > >> ** using staged installation
> > >> ** R
> > >> ** inst
> > >> ** byte-compile and prepare package for lazy loading
> > >> Fatal error: cannot open file 'C:\Users\David': No such file or directory
> > >>
> > >> ERROR: lazy loading failed for package 'callr'
> > >> * removing 'C:/myRLib/callr'
> > >> Warning in install.packages :
> > >>    installation of package ‘callr’ had non-zero exit status
> > >>
> > >> I also tried
> > >>
> > >> install.packages('callr',lib='c:/myRLib',destdir='c:/myRLib')
> > >>
> > >> with the same result. There's something more here that I'm unable to discover.
> > >>
> > >> Best
> > >> David
> > >> On 12/12/2019 8:56 AM, Eric Berger wrote:
> > >>
> > >> Apparently it does not like that the fact that your user 'David
> > >> Stevens' has a blank.
> > >> Looking at the documentation ?install.packages
> > >> it seems that if you modify your call to something like
> > >>
> > >> install.packages('callr',destdir='C:\tmp')
> > >>
> > >> you might be ok. (caveat: I did not try this)
> > >>
> > >> You should make the directory C:\tmp (or whatever you use instead)
> > >> before you issue this call.
> > >>
> > >> HTH,
> > >> Eric
> > >>
> > >> On Thu, Dec 12, 2019 at 5:48 PM David Stevens <david.stevens using usu.edu><mailto:david.stevens using usu.edu> wrote:
> > >>
> > >>
> > >> Certain R packages will not install properly on my Windows 10 computer. For example, if I
> > >>
> > >> install.packages('callr')
> > >>
> > >> The result is
> > >>
> > >> trying URL 'https://cloud.r-project.org/src/contrib/callr_3.4.0.tar.gz'
> > >> Content type 'application/x-gzip' length 100129 bytes (97 KB)
> > >> downloaded 97 KB
> > >>
> > >> Warning: invalid package 'C:\Users\David'
> > >> Warning: invalid package 'Stevens\AppData\Local\Temp\Rtmpk5NqrI/downloaded_packages/callr_3.4.0.tar.gz'
> > >> Error: ERROR: no packages specified
> > >> Warning in install.packages :
> > >>    installation of package ‘callr’ had non-zero exit status
> > >>
> > >> The downloaded source packages are in
> > >>          ‘C:\Users\David Stevens\AppData\Local\Temp\Rtmpk5NqrI\downloaded_packages’
> > >>
> > >> both using RStudio 1.2.5019 and the Rgui.exe 3.6.2. I look in the download folder and the callr_3.4.0.tar.gz is there but the installer can't find it. This happens on only a subset of packages I install or update. I assume the cause is the space in my name in the c:\users folder. I've been unable to locate the environment variable or registry value that routes the tar.gz files to this location. Any ideas on how to fix this? This is a relatively recent issue (i.e. I never saw it before November - I've used R for ~15 years).
> > >>
> > >> Best regards
> > >>
> > >> David Stevens
> > >>
> > >>
> > >>
> > >>          [[alternative HTML version deleted]]
> > >>
> > >> ______________________________________________
> > >> R-help using r-project.org<mailto:R-help using r-project.org> mailing list -- To UNSUBSCRIBE and more, see
> > >> https://stat.ethz.ch/mailman/listinfo/r-help
> > >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > >> and provide commented, minimal, self-contained, reproducible code.
> > >>
> > >>
> > >> On 12/12/2019 8:56 AM, Eric Berger wrote:
> > >>
> > >> Apparently it does not like that the fact that your user 'David
> > >> Stevens' has a blank.
> > >> Looking at the documentation ?install.packages
> > >> it seems that if you modify your call to something like
> > >>
> > >> install.packages('callr',destdir='C:\tmp')
> > >>
> > >> you might be ok. (caveat: I did not try this)
> > >>
> > >> You should make the directory C:\tmp (or whatever you use instead)
> > >> before you issue this call.
> > >>
> > >> HTH,
> > >> Eric
> > >>
> > >> On Thu, Dec 12, 2019 at 5:48 PM David Stevens <david.stevens using usu.edu><mailto:david.stevens using usu.edu> wrote:
> > >>
> > >>
> > >>
> > >> Certain R packages will not install properly on my Windows 10 computer. For example, if I
> > >>
> > >> install.packages('callr')
> > >>
> > >> The result is
> > >>
> > >> trying URL 'https://cloud.r-project.org/src/contrib/callr_3.4.0.tar.gz'
> > >> Content type 'application/x-gzip' length 100129 bytes (97 KB)
> > >> downloaded 97 KB
> > >>
> > >> Warning: invalid package 'C:\Users\David'
> > >> Warning: invalid package 'Stevens\AppData\Local\Temp\Rtmpk5NqrI/downloaded_packages/callr_3.4.0.tar.gz'
> > >> Error: ERROR: no packages specified
> > >> Warning in install.packages :
> > >>    installation of package ‘callr’ had non-zero exit status
> > >>
> > >> The downloaded source packages are in
> > >>          ‘C:\Users\David Stevens\AppData\Local\Temp\Rtmpk5NqrI\downloaded_packages’
> > >>
> > >> both using RStudio 1.2.5019 and the Rgui.exe 3.6.2. I look in the download folder and the callr_3.4.0.tar.gz is there but the installer can't find it. This happens on only a subset of packages I install or update. I assume the cause is the space in my name in the c:\users folder. I've been unable to locate the environment variable or registry value that routes the tar.gz files to this location. Any ideas on how to fix this? This is a relatively recent issue (i.e. I never saw it before November - I've used R for ~15 years).
> > >>
> > >> Best regards
> > >>
> > >> David Stevens
> > >>
> > >>
> > >>
> > >>          [[alternative HTML version deleted]]
> > >>
> > >> ______________________________________________
> > >> R-help using r-project.org<mailto:R-help using r-project.org> mailing list -- To UNSUBSCRIBE and more, see
> > >> https://stat.ethz.ch/mailman/listinfo/r-help
> > >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > >> and provide commented, minimal, self-contained, reproducible code.
> > >>
> > >>
> > >> --
> > >> David K Stevens, PhD, PE
> > >> Environmental Engineering Division
> > >> Civil and Environmental Engineering
> > >> Utah State University
> > >> 8200 Old Main Hill
> > >> Logan, UT 83200-8200
> > >> (435) 797-3229
> > >> david.stevens using usu.edu<mailto:david.stevens using usu.edu>
> > >>
> > >>          [[alternative HTML version deleted]]
> > >>
> > >> ______________________________________________
> > >> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > >> https://stat.ethz.ch/mailman/listinfo/r-help
> > >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > >> and provide commented, minimal, self-contained, reproducible code.
> >
> > --
> > David K Stevens, PhD, PE
> > Environmental Engineering Division
> > Civil and Environmental Engineering
> > Utah State University
> > 8200 Old Main Hill
> > Logan, UT 83200-8200
> > (435) 797-3229
> > david.stevens using usu.edu
> >
> > ______________________________________________
> > R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list