I am getting error while installing packages

install.packages("lifecycle")
Installing package into ‘C:/Users/shihab's pc/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘glue’, ‘rlang’

There is a binary version available but the source version
is later:
binary source needs_compilation
lifecycle 0.1.0 0.2.0 FALSE

package ‘glue’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\shihab's pc\AppData\Local\Temp\RtmpUVSEoP\downloaded_packages
installing the source package ‘lifecycle’

trying URL 'http://cran.rstudio.com/src/contrib/lifecycle_0.2.0.tar.gz'
Content type 'application/x-gzip' length 164455 bytes (160 KB)
downloaded 160 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: unexpected symbol in "tools:::makeLazyLoading("lifecycle", "C:/Users/shihab's pc/Documents/R/win-library/3.6/00LOCK-lifecycle/00new", keep.source = FALSE, keep.parse.data = FALSE, set.install.dir = 'C:/Users/shihab"
    Execution halted
    ERROR: lazy loading failed for package 'lifecycle'
  • removing 'C:/Users/shihab's pc/Documents/R/win-library/3.6/lifecycle'
    Warning in install.packages :
    installation of package ‘lifecycle’ had non-zero exit status

R doesn't like empty spaces on Windows user names, try installing on the system level library instead (you need to run RStudio as administrator for this).

# Change the path accordingly with your own R version
install.packages("lifecycle", lib = "C:\\Program Files\\R\\R-3.6.3\\library")

3 posts were split to a new topic: Problem installing dplyr on RStudio Cloud

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.