Trying to install devtools, but keep getting the error
Error : object ‘glue_collapse’ is not exported by 'namespace:glue'
ERROR: lazy loading failed for package ‘usethis’
Below is the full error code:
> install.packages('devtools', repos='http://cran.rstudio.com/')
also installing the dependency ‘usethis’
There are binary versions available but
the source versions are later:
binary source needs_compilation
usethis 1.4.0 1.5.0 FALSE
devtools 1.13.6 2.0.2 FALSE
installing the source packages ‘usethis’, ‘devtools’
trying URL 'http://cran.rstudio.com/src/contrib/usethis_1.5.0.tar.gz'
Content type 'application/x-gzip' length 393903 bytes (384 KB)
==================================================
downloaded 384 KB
trying URL 'http://cran.rstudio.com/src/contrib/devtools_2.0.2.tar.gz'
Content type 'application/x-gzip' length 388141 bytes (379 KB)
==================================================
downloaded 379 KB
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2018i.1.0/zoneinfo/America/Los_Angeles'
* installing *source* package ‘usethis’ ...
** package ‘usethis’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error : object ‘glue_collapse’ is not exported by 'namespace:glue'
ERROR: lazy loading failed for package ‘usethis’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/usethis’
Warning in install.packages :
installation of package ‘usethis’ had non-zero exit status
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2018i.1.0/zoneinfo/America/Los_Angeles'
ERROR: dependency ‘usethis’ is not available for package ‘devtools’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/devtools’
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/6m/np7rbj6d6hv6xf8y_9x5pq000000gn/T/Rtmp8PDiFb/downloaded_packages’
I've installed tidyverse which has the glue package encompassed within it, but still getting issues with glue_collapse. Additionally, is it possible to turn off lazy loading to fix the 'usethis' dependency issue? Tried searching ways, but no successful methods.
Adding my original comment as an answer to mark this resolved. Turns out I needed to install the glue package separately, which then fixed the usethis issue.
Related
While trying to install and load the package Hmisc in RStudio, I ran into an error. Upon inspection, it turned out to originate from ggplot2. I can replicate the error on my machine as follows:
> install.packages("ggplot2", dependencies=TRUE)
# see bottom of this post for the full log of this command.
> library(ggplot2)
Error in library(ggplot2) : there is no package called 'ggplot2'
I have reinstalled RStudio and its packages, but without success. Also, some other packages (such as AER) do work properly.
Any advice on how to solve this issue would be greatly appreciated.
Full log of install.packages("ggplot2"):
Installing package into <some library>
(as ‘lib’ is unspecified)
also installing the dependencies ‘cli’, ‘rlang’, ‘lifecycle’, ‘scales’
There are binary versions available but the source versions are later:
binary source needs_compilation
cli 3.2.0 3.4.1 TRUE
rlang 1.0.2 1.0.6 TRUE
lifecycle 1.0.1 1.0.3 FALSE
scales 1.2.0 1.2.1 FALSE
ggplot2 3.3.5 3.3.6 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
<some library>
installing the source packages ‘lifecycle’, ‘scales’, ‘ggplot2’
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/scales_1.2.1.tar.gz'
Content type 'application/x-gzip' length 270609 bytes (264 KB)
downloaded 264 KB
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.3.6.tar.gz'
Content type 'application/x-gzip' length 3061989 bytes (2.9 MB)
downloaded 2.9 MB
* 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 <some library>
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'scales'
* removing <some library>
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependency 'scales' is not available for package 'ggplot2'
* removing <some library>
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
<some library>
After being advised to install rlang, I first ran remove.packages(rlang), and then install.packages("rlang"), type="source"). However, when I then run library(rlang), I get the error Error in library(rlang) : there is no package called ‘rlang’. Here is the output of install.packages("rlang"):
Installing package into < some library >
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/rlang_1.0.6.tar.gz'
Content type 'application/x-gzip' length 742508 bytes (725 KB)
downloaded 725 KB
* installing *source* package 'rlang' ...
** package 'rlang' successfully unpacked and MD5 sums checked
** using staged installation
** libs
*** arch - i386
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'rlang'
* removing < some library >
Warning in install.packages :
installation of package ‘rlang’ had non-zero exit status
The downloaded source packages are in
< some library >
I'm out of options to install ggplot. I tried installing from Tools, from the console itself, indicating the cran source, indicating the local dir that the ggplot.gz file appears in. None of them works. I tried installing devtools first but same issue with that package too. I still get the error as follows:
install.packages("ggplot2")
Installing package into ‘\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘lifecycle’, ‘rlang’, ‘scales’, ‘withr’
There are binary versions available but the source versions are later:
binary source needs_compilation
lifecycle 0.2.0 1.0.1 FALSE
rlang 0.4.5 1.0.2 TRUE
scales 1.1.0 1.2.0 FALSE
withr 2.2.0 2.5.0 FALSE
ggplot2 3.3.0 3.3.6 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rlang_0.4.5.zip'
Content type 'application/zip' length 1115838 bytes (1.1 MB)
downloaded 1.1 MB
package ‘rlang’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\asadeghi8\AppData\Local\Temp\RtmpY96UwM\downloaded_packages
installing the source packages ‘lifecycle’, ‘scales’, ‘withr’, ‘ggplot2’
trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.1.tar.gz'
Content type 'application/x-gzip' length 99716 bytes (97 KB)
downloaded 97 KB
trying URL 'https://cran.rstudio.com/src/contrib/scales_1.2.0.tar.gz'
Content type 'application/x-gzip' length 270188 bytes (263 KB)
downloaded 263 KB
trying URL 'https://cran.rstudio.com/src/contrib/withr_2.5.0.tar.gz'
Content type 'application/x-gzip' length 102089 bytes (99 KB)
downloaded 99 KB
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.3.6.tar.gz'
Content type 'application/x-gzip' length 3061989 bytes (2.9 MB)
downloaded 2.9 MB
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'lifecycle'
* removing '\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5/lifecycle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package 'withr' ...
** package 'withr' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'withr'
finding HTML links ... done
defer html
devices html
Rd warning: C:/Users/asadeghi8/AppData/Local/Temp/RtmpIN8vq1/R.INSTALL987c3eca7587/withr/man/devices.Rd:228: file link 'X11' in package 'grDevices' does not exist and so has been treated as a topic
makevars_user html
set_makevars html
with_ html
with_collate html
with_connection html
with_db_connection html
with_dir html
with_envvar html
with_file html
with_gctorture2 html
with_language html
with_libpaths html
with_locale html
with_makevars html
with_options html
with_package html
Rd warning: C:/Users/asadeghi8/AppData/Local/Temp/RtmpIN8vq1/R.INSTALL987c3eca7587/withr/man/with_package.Rd:68: file link '.libPaths' in package 'base' does not exist and so has been treated as a topic
with_par html
with_path html
with_rng_version html
with_seed html
with_sink html
with_temp_libpaths html
with_tempfile html
with_timezone html
withr html
*** copying figures
** building package indices
** installing vignettes
Warning in file(con, "w") :
cannot open file '\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5/withr/doc/index.html': No such file or directory
Error in file(con, "w") : cannot open the connection
ERROR: installing vignettes failed
* removing '\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5/withr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘withr’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'scales'
* removing '\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5/scales'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependencies 'scales', 'withr' are not available for package 'ggplot2'
* removing '\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5/ggplot2'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\asadeghi8\AppData\Local\Temp\RtmpY96UwM\downloaded_packages’
> library("ggplot")
Error in library("ggplot") : there is no package called ‘ggplot’
I tried to update the rlang package but it when I install it again, it's the same version. This is how it's installed:
> install.packages("rlang")
Installing package into ‘\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
rlang 0.4.5 1.0.2 TRUE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rlang_0.4.5.zip'
Content type 'application/zip' length 1115838 bytes (1.1 MB)
downloaded 1.1 MB
package ‘rlang’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\asadeghi8\AppData\Local\Temp\RtmpwpTtFm\downloaded_packages
im trying to install DEVTOOLS but i keep getting the error showing . can any one assist please. The 2 errors as showing below
error 1:package usethis was built under R version 4.0.5
Error in loadNamespace
error 2:ERROR: lazy loading failed for package devtools
Here is my code
install.packages("blockmodeling", dependencies = TRUE)
install.packages("devtools", dependencies = TRUE)
library(devtools)
devtools::install_github("aslez/concoR")
install.packages("blockmodeling", dependencies = TRUE)
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/eslam/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/blockmodeling_1.0.0.zip'
Content type 'application/zip' length 410411 bytes (400 KB)
downloaded 400 KB
package ‘blockmodeling’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\eslam\AppData\Local\Temp\Rtmp6nB24u\downloaded_packages
> install.packages("devtools", dependencies = TRUE)
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/eslam/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
also installing the dependency ‘pkgload’
There are binary versions available but the source versions are later:
binary source needs_compilation
pkgload 1.2.0 1.2.1 TRUE
devtools 2.3.2 2.4.0 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/pkgload_1.2.0.zip'
Content type 'application/zip' length 151933 bytes (148 KB)
downloaded 148 KB
package ‘pkgload’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\eslam\AppData\Local\Temp\Rtmp6nB24u\downloaded_packages
installing the source package ‘devtools’
trying URL 'https://cran.rstudio.com/src/contrib/devtools_2.4.0.tar.gz'
Content type 'application/x-gzip' length 369987 bytes (361 KB)
downloaded 361 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.0.5
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'pkgload' 1.2.0 is being loaded, but >= 1.2.1 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
> ERROR
: lazy loading failed for package 'devtools'
* removing 'C:/Users/eslam/Documents/R/win-library/4.0/devtools'
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\eslam\AppData\Local\Temp\Rtmp6nB24u\downloaded_packages’
> library(devtools)
Error in library(devtools) : there is no package called ‘devtools’
> devtools::install_github("aslez/concoR")
Error in loadNamespace(name) : there is no package called ‘devtools’
Thanks everyone for the support.
i figured it out . i had to run
install.packages("devtools,type="win.binary")
I updated R to the latest version "R version 3.3.3 (2017-03-06)". I am using macOS Mojave.
Now, when I am trying to knit the code in the Markdown, I get an error. I figured this is because I don't have an updated version of the "yaml" package. However, when I am trying to update the "yaml" package, I get the following errors:
installing the source package ‘yaml’
trying URL 'https://cran.rstudio.com/src/contrib/yaml_2.2.0.tar.gz'
Content type 'application/x-gzip' length 89447 bytes (87 KB)
==================================================
downloaded 87 KB
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2019a.1.0/zoneinfo/America/Chicago'
* installing *source* package ‘yaml’ ...
** package ‘yaml’ successfully unpacked and MD5 sums checked
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘yaml’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/yaml’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/yaml’
Warning in install.packages :
installation of package ‘yaml’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/_r/cgv1gmqx1vzgv25k1k805lyw0000gn/T/RtmpagnKIL/downloaded_packages’
I need the MVN package for multivariate normality test.
During it's installation, my laptop turned off.
After it restarted when I wanted to install MVN again, I got various "had non-zero exit status" that were gone after installing libcurl etc.
But now, I have other errors.
> install.packages("MVN")
Installing package into ‘/home/mslaav/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘kableExtra’
próbowanie adresu URL 'https://cloud.r-project.org/src/contrib/kableExtra_0.9.0.tar.gz'
Content type 'application/x-gzip' length 1638582 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
próbowanie adresu URL 'https://cloud.r-project.org/src/contrib/MVN_5.5.tar.gz'
Content type 'application/x-gzip' length 342047 bytes (334 KB)
==================================================
downloaded 334 KB
* installing *source* package ‘kableExtra’ ...
** pakiet ‘kableExtra’ został pomyślnie rozpakowany oraz sumy MD5 zostały sprawdzone
** R
** inst
** preparing package for lazy loading
Ostrzeżenie: S3 methods ‘[.spec_tbl_df’, ‘as.col_spec.NULL’, ‘as.col_spec.character’, ‘as.col_spec.col_spec’, ‘as.col_spec.default’, ‘as.col_spec.list’, ‘format.col_spec’, ‘output_column.POSIXt’, ‘output_column.default’, ‘output_column.double’, ‘print.col_spec’, ‘print.collector’, ‘print.date_names’, ‘print.locale’, ‘str.col_spec’ were declared in NAMESPACE but not found
Error in library.dynam(lib, package, package.lib) :
shared object ‘readr.so’ not found
ERROR: lazy loading failed for package ‘kableExtra’
* removing ‘/home/mslaav/R/x86_64-pc-linux-gnu-library/3.4/kableExtra’
Warning in install.packages :
installation of package ‘kableExtra’ had non-zero exit status
ERROR: dependency ‘kableExtra’ is not available for package ‘MVN’
* removing ‘/home/mslaav/R/x86_64-pc-linux-gnu-library/3.4/MVN’
Warning in install.packages :
installation of package ‘MVN’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpF6Tden/downloaded_packages’
I tried reinstalling R and Rstudio, but it didn't help.