2

I need to install older versions of certain R packages so that they are compatible with a shiny app I need to run.

I have rtools40 installed, and have written the make utils on the path, but I cannot install certain packages from the CRAN archive.

When I try to install certain packages from archive/source, this error message appears:

For example, trying to install proxy v 0.4-26:

install_version("proxy", version = "0.4-26", repos = "http://lib.stat.cmu.edu/R/CRAN/")
C:\Users\Username\Onedrive\Documents\rtools40\mingw32\i686-w64-mingw32\bin\ld.exe: cannot open output file proxy.dll: No such file or directory

collect2.exe: error: ld returned 1 exit status

no DLL was created

ERROR: compilation failed for package 'proxy'

Full output:

Downloading package from url: http://lib.stat.cmu.edu/R/CRAN//src/contrib/Archive/proxy/proxy_0.4-26.tar.gz

* installing *source* package 'proxy' ...

** package 'proxy' successfully unpacked and MD5 sums checked

** using staged installation

** libs

 

*** arch - i386

"C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/"gcc  -I"C:/Users/Username/ONEDRI~1/DOCUME~1/R-41~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -c apply.c -o apply.o

"C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/"gcc  -I"C:/Users/Username/ONEDRI~1/DOCUME~1/R-41~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -c arrayIndex.c -o arrayIndex.o

"C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/"gcc  -I"C:/Users/Username/ONEDRI~1/DOCUME~1/R-41~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -c distance.c -o distance.o

distance.c: In function 'ebinary':

distance.c:426:8: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]

     if (ISNAN(xy))

        ^

distance.c: In function 'cosine':

distance.c:473:8: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]

     if (ISNAN(xy))

        ^

"C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/"gcc  -I"C:/Users/Username/ONEDRI~1/DOCUME~1/R-41~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -c dll.c -o dll.o

"C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/"gcc  -I"C:/Users/Username/ONEDRI~1/DOCUME~1/R-41~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -c util.c -o util.o

C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/gcc -shared -s -static-libgcc -o proxy.dll tmp.def apply.o arrayIndex.o distance.o dll.o util.o -LC:/Users/Username/ONEDRI~1/DOCUME~1/R-41~1.3/bin/i386 -lR

C:\Users\Username\OneDrive\Documents\rtools40\mingw32\i686-w64-mingw32\bin\ld.exe: cannot open output file proxy.dll: No such file or directory

collect2.exe: error: ld returned 1 exit status

no DLL was created

ERROR: compilation failed for package 'proxy'

* removing 'C:/Users/Username/OneDrive/Documents/R-4.1.3/library/proxy'

Warning message:

In i.p(...) :

  installation of package ‘C:/Users/Username/AppData/Local/Temp/RtmpSYvdjN/remotes2fb424c4689f/proxy’ had non-zero exit status

I have also tried to install these packages by downloading their tar.gz files first, which also results in the same error message.

However, I can install some packages via archive/tar.gz or zip file.

Packages that I cannot install include: ("classInt", "cli", "dplyr", "e1071", "farver", "geojsonsf", "htmltools", "openssl", "processx", "proxy", "ps", "raster", "Rcpp", "rlang", "roxygen2", "RSQLite", "s2", "sass", "sf", "sp", "terra", "testthat", "tibble", "xfun")

N.b. I changed the name of the file paths slightly for security reasons.

I am using Windows 10 with R 4.1.3 (2022-03-10)

Any help would be greatly appreciated! I apologise in advance if any of this information is unclear.

UPDATE: I have managed to install some older versions & source packages after removing and reinstalling R, R studio and Rtools into the same file, with the same access rights (R and R Studio were previously installed into a weird location by IT at work). There are still some packages that I can't install from their tar.gz files, this error message appears:

install_version("processx", version = "3.5.3", repos = "http://lib.stat.cmu.edu/R/CRAN/")
Downloading package from url: http://lib.stat.cmu.edu/R/CRAN//src/contrib/Archive/processx/processx_3.5.3.tar.gz
* installing *source* package 'processx' ...
** package 'processx' successfully unpacked and MD5 sums checked
** using staged installation
** libs

*** arch - i386
"C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/"gcc  -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -Wall tools/px.c -o tools/px.exe
C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find C:/Users/Username/OneDrive: Permission denied
C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -: No such file or directory
C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find OneDrive: No such file or directory
C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find OneDrive: No such file or directory
C:/Users/Username/OneDrive/Documents/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find OneDrive/Documents/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/lib/../lib/default-manifest.o: No such file or directory
collect2.exe: error: ld returned 1 exit status
make: *** [Makevars.win:18: tools/px.exe] Error 1
ERROR: compilation failed for package 'processx'
* removing 'C:/Users/Username/OneDrive/Documents/R-4.1.3/library/processx'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/Username/AppData/Local/Temp/RtmpYrC9em/remotes35d836f16857/processx’ had non-zero exit status

0 Answers0