I am unable to public my R notebook. When I try to publish, I get the following error:
Console~/
Console
R Markdown
.../R Test 1/Fall Programming with R Test 1.Rmd
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'backports'
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
I tried to install backports, but it doesn't seem to work either. I get this error when I try to install backports:
> install.packages("backports")
Installing package into ‘C:/Users/agdpa/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
backports 1.1.0 1.1.1 FALSE
installing the source package ‘backports’
trying URL 'https://cran.rstudio.com/src/contrib/backports_1.1.1.tar.gz'
Content type 'application/x-gzip' length 10090 bytes
downloaded 10090 bytes
* installing *source* package 'backports' ...
** package 'backports' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "C:/PROGRA~1/R/R-34~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-34~1.1/share/make/winshlib.mk" SHLIB="backports.dll" OBJECTS="dotsElt.o dotsLength.o init.o"' had status 127
ERROR: compilation failed for package 'backports'
* removing 'C:/Users/agdpa/Documents/R/win-library/3.4/backports'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\agdpa\Documents\R\win-library\3.4" C:\Users\agdpa\AppData\Local\Temp\Rtmp8IcAL2/downloaded_packages/backports_1.1.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘backports’ had non-zero exit status
I'm getting a similar error with the backports R package. It's preventing the devtools package from installing a customised package which I've written.
I fixed it by installing the previous version of backports:
require(devtools)
install_version("backports", version = "1.1.0")
I solved it reinstalling Rtools (I'm running of Windows).
Related
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.
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")
Here I attempt to download an earlier version of 'backports' to deal with the issue. Any ideas where to look or how to approach this issue?
> library(devtools)
Warning message:
package ‘devtools’ was built under R version 3.2.5
> install_version("backports",version="1.1.0")
Trying https://cran.rstudio.com/
Trying http://www.stats.ox.ac.uk/pub/RWin
Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/backports/backports_1.1.0.tar.gz
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached
> install.packages("rmarkdown")
Installing package into ‘H:/R/win-library/3.2’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
rmarkdown 1.4 1.8 FALSE
installing the source package ‘rmarkdown’
trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_1.8.tar.gz'
Content type 'application/x-gzip' length 2093181 bytes (2.0 MB)
downloaded 2.0 MB
* installing *source* package 'rmarkdown' ...
** package 'rmarkdown' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'backports'
ERROR: lazy loading failed for package 'rmarkdown'
* removing 'H:/R/win-library/3.2/rmarkdown'
* restoring previous 'H:/R/win-library/3.2/rmarkdown'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l
"H:\R\win-library\3.2" C:\Users\jacarter\AppData\Local\Temp\3\RtmpULt4Do/downloaded_packages/rmarkdown_1.8.tar.gz' had status 1
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\jacarter\AppData\Local\Temp\3\RtmpULt4Do\downloaded_packages’
> require("caret")
Loading required package: caret
Loading required package: lattice
Loading required package: ggplot2
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘pbkrtest’
So I found that there is lack of "pbkrtest" then I tried to reinstall it.
> install.packages("pbkrtest")
Installing package into ‘C:/Users/ADMIN/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is
later:
binary source needs_compilation
pbkrtest 0.4-2 0.4-3 FALSE
installing the source package ‘pbkrtest’
trying URL 'https://rweb.crmda.ku.edu/cran/src/contrib/pbkrtest_0.4- 3.tar.gz'
Content type 'application/x-gzip' length 164415 bytes (160 KB)
downloaded 160 KB
* installing *source* package 'pbkrtest' ...
** package 'pbkrtest' successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
Warning: replacing previous import by 'stats::sigma' when loading 'pbkrtest'
Error : object 'sigma' is not exported by 'namespace:stats'
ERROR: lazy loading failed for package 'pbkrtest'
* removing 'C:/Users/ADMIN/Documents/R/win-library/3.2/pbkrtest'
The downloaded source packages are in
‘C:\Users\ADMIN\AppData\Local\Temp\Rtmpk7mJT0\downloaded_packages’
Warning messages:
1: running command '"D:/R-3.2.3/bin/x64/R" CMD INSTALL -l
"C:\Users\ADMIN\Documents\R\win-library\3.2"
C:\Users\ADMIN\AppData\Local\Temp\Rtmpk7mJT0/downloaded_packages/pbkrtest_0.4- 3.tar.gz' had status 1
2: In install.packages("pbkrtest") :
installation of package ‘pbkrtest’ had non-zero exit status
It seems like that the installation keeps failing.
As a result, I couldn't use other code using caret packages.
I faced this problem as well on Windows 7. I did following steps in the sequence and it worked.
a) Make sure your R version is updated latest R release 3.2.3
b) The default sources seems to be installing Unix version. So I manually downloaded https://cran.r-project.org/web/packages/pbkrtest/index.html for windows
c) Use manually install function from R menu to install the package.
Cheers,
Ratan
Check version of R by typing version in your console.
If version is not "version.string R version 3.3.2" or later then
Install new version of R from https://cran.r-project.org/bin/windows/base/
Update R version using Tools => Global Options in RStudio.
install package using "install.packages("caret")" in your console.
do require(caret).
test using ?createDataPartition.