I am on WIN 10 and I suspect it is due to polish character in my user profile folder. Even though i am using:
Sys.setlocale(category = "LC_ALL", locale = "Polish")
I suspect installation fails, since it can't read the Polish character correctly. I encountered this issue when I installed a new R version. I have already tried clean reinstall for 4.0.3 and 4.0.2 (I had no issues before on 4.0.2). Right now I cannot install packages that I previously managed to successfully install on 4.0.2 due to error described below.
Do you also believe that this is due to character in my name or could it be another reason?
I started a fresh session as an administrator and the issue does not occur for all packages. Packages that I have identified so far: raster, here, rprojroot. It also seems that the issue occurs for packages when they are installed from the "source" (not binary) and that need compilation.
> install.packages("raster")
There is a binary version available but the source version is later:
binary source needs_compilation
raster 3.3-13 3.4-5 TRUE
installing the source package ‘raster’
trying URL 'https://cran.rstudio.com/src/contrib/raster_3.4-5.tar.gz'
Content type 'application/x-gzip' length 575921 bytes (562 KB)
downloaded 562 KB
* installing *source* package 'raster' ...
** package 'raster' successfully unpacked and MD5 sums checked
** using staged installation
Error in .read_description(dfile) :
• file 'C:/Users/Bart³omiej/AppData/Local/Temp/Rtmp8oARfm/R.INSTALL4f4010567bff/raster/DESCRIPTION' does not exist
ERROR: installing package DESCRIPTION failed for package 'raster'
* removing 'C:/Program Files/R/R-4.0.3/library/raster'
* restoring previous 'C:/Program Files/R/R-4.0.3/library/raster'
Warning in install.packages :
installation of package ‘raster’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Bart³omiej\AppData\Local\Temp\RtmpYppZKp\downloaded_packages’
Warning messages:
1: In load(cacheFile, envir = .rs.CachedDataEnv) :
strings not representable in native encoding will be translated to UTF-8
2: In load(cacheFile, envir = .rs.CachedDataEnv) :
strings not representable in native encoding will be translated to UTF-8
> Sys.setlocale(category = "LC_ALL", locale = "Polish")
[1] "LC_COLLATE=Polish_Poland.1250;LC_CTYPE=Polish_Poland.1250;LC_MONETARY=Polish_Poland.1250;LC_NUMERIC=C;LC_TIME=Polish_Poland.1250"
> install.packages("raster")
There is a binary version available but the source version is later:
binary source needs_compilation
raster 3.3-13 3.4-5 TRUE
installing the source package ‘raster’
trying URL 'https://cran.rstudio.com/src/contrib/raster_3.4-5.tar.gz'
Content type 'application/x-gzip' length 575921 bytes (562 KB)
downloaded 562 KB
* installing *source* package 'raster' ...
** package 'raster' successfully unpacked and MD5 sums checked
** using staged installation
Error in .read_description(dfile) :
file 'C:/Users/Bartłomiej/AppData/Local/Temp/Rtmp6dXzVp/R.INSTALL2804cde12aa/raster/DESCRIPTION' does not exist
ERROR: installing package DESCRIPTION failed for package 'raster'
* removing 'C:/Program Files/R/R-4.0.3/library/raster'
* restoring previous 'C:/Program Files/R/R-4.0.3/library/raster'
Warning in install.packages :
installation of package ‘raster’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Bartłomiej\AppData\Local\Temp\RtmpYppZKp\downloaded_packages’
> install.packages("rprojroot")
There is a binary version available but the source version is later:
binary source needs_compilation
rprojroot 1.3-2 2.0.2 FALSE
installing the source package ‘rprojroot’
trying URL 'HERE IS CORRECT LINK' <- THE SITE DID NOT ALLOW TO PUT MORE THAN 2 LINKS IN POST
Content type 'application/x-gzip' length 59967 bytes (58 KB)
downloaded 58 KB
* installing *source* package 'rprojroot' ...
** package 'rprojroot' successfully unpacked and MD5 sums checked
** using staged installation
Error in .read_description(dfile) :
file 'C:/Users/Bartłomiej/AppData/Local/Temp/RtmpCKcZEB/R.INSTALL3dc44c486ca8/rprojroot/DESCRIPTION' does not exist
ERROR: installing package DESCRIPTION failed for package 'rprojroot'
* removing 'C:/Program Files/R/R-4.0.3/library/rprojroot'
* restoring previous 'C:/Program Files/R/R-4.0.3/library/rprojroot'
Warning in install.packages :
installation of package ‘rprojroot’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Bartłomiej\AppData\Local\Temp\RtmpYppZKp\downloaded_packages’