[Asking for a colleague because his post is considered as a spam by the website bot.]
I am trying to install the package stringr on R.
I ran install.packages("stringr") in RStudio and it raised an error. Then, I try installing it from the terminal and it raised a similar error, see below. Any package I try to install raises the same issue.
I have Windows 10 but I do not have admin rights. I have R version 4.0.5. I installed R and RStudio via Anaconda. By the way, it seems that there is an issue with Rtools. The content of .Renviron is PATH="${RTOOLS42_HOME}\usr\bin;${PATH}" (as it should be I guess) but Sys.which("make") returns "" in Rstudio. One last thing, my R home environment is on my OneDrive folder, maybe this causes the issue?
Any idea?
C:\Users\TDOUENN>Rscript -e "install.packages('stringr', repos='https://cran.rstudio.com/')"
Installing package into 'C:/Users/TDOUENN/OneDrive - UvA/Documents/My_RLibs'
(as 'lib' is unspecified)
also installing the dependencies 'cli', 'rlang', 'lifecycle'
There are binary versions available but the source versions are later:
binary source needs_compilation
cli 3.2.0 3.6.0 TRUE
rlang 1.0.2 1.0.6 TRUE
lifecycle 1.0.1 1.0.3 FALSE
stringr 1.4.0 1.5.0 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/cli_3.2.0.zip'
Content type 'application/zip' length 1255499 bytes (1.2 MB)
==================================================
downloaded 1.2 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/rlang_1.0.2.zip'
Content type 'application/zip' length 1718546 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
package 'cli' successfully unpacked and MD5 sums checked
package 'rlang' successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\TDOUENN\AppData\Local\Temp\RtmpkPFcWJ\downloaded_packages
installing the source packages 'lifecycle', 'stringr'
trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.3.tar.gz'
Content type 'application/x-gzip' length 106854 bytes (104 KB)
==================================================
downloaded 104 KB
trying URL 'https://cran.rstudio.com/src/contrib/stringr_1.5.0.tar.gz'
Content type 'application/x-gzip' length 175699 bytes (171 KB)
==================================================
downloaded 171 KB
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 1.0.2 is being loaded, but >= 1.0.6 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/TDOUENN/OneDrive - UvA/Documents/My_RLibs/lifecycle'
* installing *source* package 'stringr' ...
** package 'stringr' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'lifecycle' 1.0.0 is being loaded, but >= 1.0.3 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'stringr'
* removing 'C:/Users/TDOUENN/OneDrive - UvA/Documents/My_RLibs/stringr'
The downloaded source packages are in
'C:\Users\TDOUENN\AppData\Local\Temp\RtmpkPFcWJ\downloaded_packages'
Warning messages:
1: In install.packages("stringr", repos = "https://cran.rstudio.com/") :
installation of package 'lifecycle' had non-zero exit status
2: In install.packages("stringr", repos = "https://cran.rstudio.com/") :
installation of package 'stringr' had non-zero exit status
C:\Users\TDOUENN>Rscript -e "install.packages('stringr', repos='https://cran.rstudio.com/')"
Based on these lines from the error message:
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 1.0.2 is being loaded, but >= 1.0.6 is required
And this error:
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'lifecycle' 1.0.0 is being loaded, but >= 1.0.3 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
It looks like your colleague needs to update their lifecycle and rlang packages in order to install stringr.
Related
For some reason, I dont seem to be able to install the package.
I tried to install it today but I get a couple of errors including the final "Warning in install.packages :
installation of package ‘photosynthesis’ had non-zero exit status"
I have installed other packages and that one is the only one that seems to have a problem.
Some colleagues have been able to install it so I do not know what I am doing wrong
Some help would be really appreciated it
Edit: Full error message
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/rlibs/4.0.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘cli’, ‘lifecycle’, ‘rlang’, ‘vctrs’, ‘ggplot2’
There are binary versions available but the source versions are later:
binary source needs_compilation
cli 3.2.0 3.6.0 TRUE
lifecycle 1.0.1 1.0.3 FALSE
rlang 1.0.2 1.0.6 TRUE
vctrs 0.4.1 0.5.2 TRUE
ggplot2 3.3.5 3.4.0 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/cli_3.2.0.zip'
Content type 'application/zip' length 1255499 bytes (1.2 MB)
downloaded 1.2 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/rlang_1.0.2.zip'
Content type 'application/zip' length 1718546 bytes (1.6 MB)
downloaded 1.6 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/vctrs_0.4.1.zip'
Content type 'application/zip' length 1569486 bytes (1.5 MB)
downloaded 1.5 MB
package ‘cli’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\quesadaa\AppData\Local\Temp\RtmpMBWG1b\downloaded_packages
installing the source packages ‘lifecycle’, ‘ggplot2’, ‘photosynthesis’
trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.3.tar.gz'
Content type 'application/x-gzip' length 106854 bytes (104 KB)
downloaded 104 KB
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.4.0.tar.gz'
Content type 'application/x-gzip' length 3148426 bytes (3.0 MB)
downloaded 3.0 MB
trying URL 'https://cran.rstudio.com/src/contrib/photosynthesis_2.1.1.tar.gz'
Content type 'application/x-gzip' length 2678855 bytes (2.6 MB)
downloaded 2.6 MB
'\\ad.helsinki.fi\home\q\quesadaa\Documents'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 1.0.2 is being loaded, but >= 1.0.6 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/rlibs/4.0.5/lifecycle'
* restoring previous 'C:/rlibs/4.0.5/lifecycle'
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
'\\ad.helsinki.fi\home\q\quesadaa\Documents'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* installing *source* package 'ggplot2' ...
** package 'ggplot2' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'vctrs' 0.4.1 is being loaded, but >= 0.5.0 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'ggplot2'
* removing 'C:/rlibs/4.0.5/ggplot2'
* restoring previous 'C:/rlibs/4.0.5/ggplot2'
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
'\\ad.helsinki.fi\home\q\quesadaa\Documents'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* installing *source* package 'photosynthesis' ...
** package 'photosynthesis' successfully unpacked and MD5 sums checked
** using staged installation
** R
Error in parse(outFile) :
C:/Users/quesadaa/AppData/Local/Temp/Rtmp4UkMHR/R.INSTALL31846c817b0d/photosynthesis/R/bake-par.R:22:12: unexpected '>'
21: # Set units ----
22: .x = .x |>
^
ERROR: unable to collate and parse R files for package 'photosynthesis'
* removing 'C:/rlibs/4.0.5/photosynthesis'
Warning in install.packages :
installation of package ‘photosynthesis’ had non-zero exit status
this is the warning massage I get.
If anyone has an idea If anyone has an idea how to help me, I would greatly appreciate it.
WARNING: Rtools is required to build R packages but is not
currently installed. Please download and install the appropriate
version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
There is a binary version available but the source version is later:
binary source needs_compilation devtools 2.4.4 2.4.5 FALSE
installing the source package ‘devtools’
trying URL
'https://cran.rstudio.com/src/contrib/devtools_2.4.5.tar.gz' Content
type 'application/x-gzip' length 374718 bytes (365 KB) downloaded 365
KB
* installing *source* package 'devtools' ...
** package 'devtools' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'htmltools' 0.5.2 is being loaded, but >= 0.5.4 is required
Calls: <Anonymous> ... namespaceImport -> loadNamespace ->
namespaceImport -> loadNamespace Execution halted ERROR: lazy loading
failed for package 'devtools'
* removing 'C:/Program Files/R/R-4.1.3/library/devtools' Warning in install.packages : installation of package ‘devtools’ had non-zero
exit status
I tried to install the package without success. I did not find a guide on the Internet that solved my problem
I'm very new to R and I've been trying to install CRAN "devtools" package in R, version 4.1.2 and keep getting the following error message (I am on a Windows 11 computer, 64-bit):
> install.packages("devtools")
Installing package into ‘C:/Users/court/OneDrive/Documents/R/win-library/4.1’ (as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
installing the source package ‘devtools’
trying URL 'https://cran.rstudio.com/src/contrib/devtools_2.4.5.tar.gz'
Content type 'application/x-gzip' length 374718 bytes (365 KB) downloaded 365 KB
* installing *source* package 'devtools' ...
** package 'devtools' successfully unpacked and MD5 sums checked **
using staged installation ** R ** inst ** byte-compile and prepare package for lazy loading
Warning message: package 'usethis' was built under R version 4.1.3
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : namespace 'htmltools' 0.5.2 is being loaded, but >= 0.5.4 is required
Calls: <Anonymous> ... namespaceImport -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'devtools' * removing 'C:/Users/court/OneDrive/Documents/R/win-library/4.1/devtools'
Warning in install.packages : installation of package ‘devtools’ had non-zero exit status The downloaded source packages are in ‘C:\Users\court\AppData\Local\Temp\RtmpSGwqVR\downloaded_packages’
Does anyone have any input about how to solve this issue?
Thanks in advance!
I installed the rtools package relevant to my computer but that didn't work. I also ran RStudio as an administrator and it didn't work either.
I'm trying to install "tidyverse" package in R using install.packages("tidyverse"), but it returns the following error:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/franc/OneDrive/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
tidyverse 1.3.1 1.3.2 FALSE
installing the source package ‘tidyverse’
tentando a URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.3.2.tar.gz'
Content type 'application/x-gzip' length 702514 bytes (686 KB)
downloaded 686 KB
* installing *source* package 'tidyverse' ...
** package 'tidyverse' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'tidyselect' 1.1.0 is being loaded, but >= 1.1.1 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'tidyverse'
* removing 'C:/Users/franc/OneDrive/Documents/R/win-library/4.0/tidyverse'
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\franc\AppData\Local\Temp\RtmpiqAHM6\downloaded_packages’
For some reason the installation doesn't work. I've also tried using install.packages('tidyverse', type = 'binary'), but it installs an older version that is incompatible with some packages I have to use.
I'm having troubles with R Markdown. I haven't used R for a while and started using it again recently, so I needed to do some updates in R. Now, R Markdown does not work. It says that it requires some updates, but once performing the updates it gives me this error message:
Installing 'rmarkdown' for R Markdown...
[1/4] Installing bslib...
Installing package into 'C:/Users/nicol/Documents/R/win-library/3.6'
(as 'lib' is unspecified)
also installing the dependency 'htmltools'
There are binary versions available but the source versions are later:
binary source needs_compilation
htmltools 0.5.1.1 0.5.3 TRUE
bslib 0.2.4 0.4.0 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/htmltools_0.5.1.1.zip'
Content type 'application/zip' length 242935 bytes (237 KB)
==================================================
downloaded 237 KB
package 'htmltools' successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\nicol\AppData\Local\Temp\Rtmpo7CXdM\downloaded_packages
installing the source package 'bslib'
trying URL 'https://cran.rstudio.com/src/contrib/bslib_0.4.0.tar.gz'
Content type 'application/x-gzip' length 4835866 bytes (4.6 MB)
==================================================
downloaded 4.6 MB
* installing *source* package 'bslib' ...
** package 'bslib' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'htmltools' 0.5.1.1 is being loaded, but >= 0.5.2 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'bslib'
* removing 'C:/Users/nicol/Documents/R/win-library/3.6/bslib'
[2/4] Installing tinytex...
The downloaded source packages are in
'C:\Users\nicol\AppData\Local\Temp\Rtmpo7CXdM\downloaded_packages'
Installing package into 'C:/Users/nicol/Documents/R/win-library/3.6'
(as 'lib' is unspecified)
also installing the dependency 'xfun'
There are binary versions available but the source versions are later:
binary source needs_compilation
xfun 0.22 0.32 TRUE
tinytex 0.31 0.41 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/xfun_0.22.zip'
Content type 'application/zip' length 323923 bytes (316 KB)
==================================================
downloaded 316 KB
package 'xfun' successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\nicol\AppData\Local\Temp\Rtmpo7CXdM\downloaded_packages
installing the source package 'tinytex'
trying URL 'https://cran.rstudio.com/src/contrib/tinytex_0.41.tar.gz'
Content type 'application/x-gzip' length 32910 bytes (32 KB)
==================================================
downloaded 32 KB
* installing *source* package 'tinytex' ...
** package 'tinytex' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'xfun' 0.22 is being loaded, but >= 0.29 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'tinytex'
* removing 'C:/Users/nicol/Documents/R/win-library/3.6/tinytex'
* restoring previous 'C:/Users/nicol/Documents/R/win-library/3.6/tinytex'
[3/4] Installing xfun...
The downloaded source packages are in
'C:\Users\nicol\AppData\Local\Temp\Rtmpo7CXdM\downloaded_packages'
Installing package into 'C:/Users/nicol/Documents/R/win-library/3.6'
(as 'lib' is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
xfun 0.22 0.32 TRUE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/xfun_0.22.zip'
Content type 'application/zip' length 323923 bytes (316 KB)
==================================================
downloaded 316 KB
package 'xfun' successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\nicol\AppData\Local\Temp\Rtmpo7CXdM\downloaded_packages
[4/4] Installing rmarkdown...
Installing package into 'C:/Users/nicol/Documents/R/win-library/3.6'
(as 'lib' is unspecified)
also installing the dependencies 'htmltools', 'bslib', 'tinytex', 'xfun'
trying URL 'https://cran.rstudio.com/src/contrib/htmltools_0.5.3.tar.gz'
Content type 'application/x-gzip' length 128129 bytes (125 KB)
==================================================
downloaded 125 KB
trying URL 'https://cran.rstudio.com/src/contrib/bslib_0.4.0.tar.gz'
Content type 'application/x-gzip' length 4835866 bytes (4.6 MB)
==================================================
downloaded 4.6 MB
trying URL 'https://cran.rstudio.com/src/contrib/tinytex_0.41.tar.gz'
Content type 'application/x-gzip' length 32910 bytes (32 KB)
==================================================
downloaded 32 KB
trying URL 'https://cran.rstudio.com/src/contrib/xfun_0.32.tar.gz'
Content type 'application/x-gzip' length 127521 bytes (124 KB)
==================================================
downloaded 124 KB
trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_2.16.tar.gz'
Content type 'application/x-gzip' length 3243854 bytes (3.1 MB)
==================================================
downloaded 3.1 MB
* installing *source* package 'htmltools' ...
** package 'htmltools' successfully unpacked and MD5 sums checked
** using staged installation
** libs
*** arch - i386
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'htmltools'
* removing 'C:/Users/nicol/Documents/R/win-library/3.6/htmltools'
* restoring previous 'C:/Users/nicol/Documents/R/win-library/3.6/htmltools'
* installing *source* package 'xfun' ...
** package 'xfun' successfully unpacked and MD5 sums checked
** using staged installation
** libs
*** arch - i386
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'xfun'
* removing 'C:/Users/nicol/Documents/R/win-library/3.6/xfun'
* restoring previous 'C:/Users/nicol/Documents/R/win-library/3.6/xfun'
* installing *source* package 'bslib' ...
** package 'bslib' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'htmltools' 0.5.1.1 is being loaded, but >= 0.5.2 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'bslib'
* removing 'C:/Users/nicol/Documents/R/win-library/3.6/bslib'
* installing *source* package 'tinytex' ...
** package 'tinytex' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'xfun' 0.22 is being loaded, but >= 0.29 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'tinytex'
* removing 'C:/Users/nicol/Documents/R/win-library/3.6/tinytex'
* restoring previous 'C:/Users/nicol/Documents/R/win-library/3.6/tinytex'
ERROR: dependency 'bslib' is not available for package 'rmarkdown'
* removing 'C:/Users/nicol/Documents/R/win-library/3.6/rmarkdown'
The downloaded source packages are in
'C:\Users\nicol\AppData\Local\Temp\Rtmpo7CXdM\downloaded_packages'
<U+2714> Package 'rmarkdown' successfully installed.
Warning messages:
1: In utils::install.packages("bslib", repos = "https://cran.rstudio.com/") :
installation of package 'bslib' had non-zero exit status
2: In utils::install.packages("tinytex", repos = "https://cran.rstudio.com/") :
installation of package 'tinytex' had non-zero exit status
3: In utils::install.packages("rmarkdown", repos = "https://cran.rstudio.com/", :
installation of package 'htmltools' had non-zero exit status
4: In utils::install.packages("rmarkdown", repos = "https://cran.rstudio.com/", :
installation of package 'xfun' had non-zero exit status
5: In utils::install.packages("rmarkdown", repos = "https://cran.rstudio.com/", :
installation of package 'bslib' had non-zero exit status
6: In utils::install.packages("rmarkdown", repos = "https://cran.rstudio.com/", :
installation of package 'tinytex' had non-zero exit status
7: In utils::install.packages("rmarkdown", repos = "https://cran.rstudio.com/", :
installation of package 'rmarkdown' had non-zero exit status
Does anyone know what I should do to make it work again?
Best regards
Nicolas