Install sp package binaries not possible? - r

> install.packages("sf")
Installing package into ‘C:/Users/koyeli.majumder/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘units’
There are binary versions available but the source versions are later:
binary source needs_compilation
units 0.5-1 0.6-0 FALSE
sf 0.6-1 0.6-3 TRUE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/sf_0.6-1.zip'
Content type 'application/zip' length 39296219 bytes (37.5 MB)
downloaded 37.5 MB
package ‘sf’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\koyeli.majumder\AppData\Local\Temp\Rtmp6LwTYc\downloaded_packages
installing the source package ‘units’
trying URL 'https://cran.rstudio.com/src/contrib/units_0.6-0.tar.gz'
Content type 'application/x-gzip' length 912393 bytes (891 KB)
downloaded 891 KB
* installing *source* package 'units' ...
** package 'units' successfully unpacked and MD5 sums checked
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** libs
Warning: running command 'make -f "Makevars.win" -f "D:/RStudio/R-3.3.3/etc/x64/Makeconf" -f "D:/RStudio/R-3.3.3/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="units.dll" WIN=64 TCLBIN=64 OBJECTS="RcppExports.o io.o udunits.o"' had status 127
ERROR: compilation failed for package 'units'
* removing 'C:/Users/koyeli.majumder/Documents/R/win-library/3.3/units'
Warning in install.packages :
running command '"D:/RStudio/R-3.3.3/bin/x64/R" CMD INSTALL -l "C:\Users\koyeli.majumder\Documents\R\win-library\3.3" C:\Users\KOYELI~1.MAJ\AppData\Local\Temp\Rtmp6LwTYc/downloaded_packages/units_0.6-0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘units’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\koyeli.majumder\AppData\Local\Temp\Rtmp6LwTYc\downloaded_packages’
> library(sf)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘units’
Error: package or namespace load failed for ‘sf’
At first I was unable to install also but after I uninstalled rgdal package, I could install sf package. But I'm unable to load it. Results in below error.
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘units’
Error: package or namespace load failed for ‘sf’
I'm unable to load package units also separately. I have a Windows 7 64 bit system.

Answer goes out to #Ralf Stubner.
You install units dependency package latest version. To compile sources into binaries you need to have installed Rtools package.
As an alternative you can use install.packages function with argument type = "binary" to install the older available binary package.
install.packages("units", type = "binary")

Related

Installing package in R: there is no package called ‘gsl’

I tried to install package copula but incurred error.
I first installed package copula, then tried:
library(copula)
and get:
Show in New WindowClear OutputExpand/Collapse Output
Error: package or namespace load failed for ‘copula’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘gsl’
Then I installed package gsl, restarted R, and tried, following this similar issue:
if(!require(pacman)) install.packages("pacman")
pacman::p_load(copula)
which didn't seem to work. I'm using macOS Big Sur OS.
Edit:
install.packages("gsl")
returned:
There is a binary version available but the source version is later:
Warning in install.packages :
cannot open compressed file '/Users/xxx/.rstudio-desktop/notebooks/3D993D5E-filename/1/8FD36A93A05DA0F7/c6uz0e7whq1or_t/_rs_rdf_111422764b18d.rdf', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection
Update:
On 18/05/21, tried
install.packages("copula")
library(copula)
and caught error below:
> install.packages("copula")
also installing the dependency ‘gsl’
There is a binary version available but the source version is later:
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Y
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/copula_1.0-1.tgz'
Content type 'application/x-gzip' length 7335219 bytes (7.0 MB)
==================================================
downloaded 7.0 MB
The downloaded binary packages are in
/var/folders/ll/dvpphrys0pddnjffq7zbl7vm0000gn/T//RtmpRUGsKi/downloaded_packages
installing the source package ‘gsl’
trying URL 'https://cran.rstudio.com/src/contrib/gsl_2.1-6.tar.gz'
Content type 'application/x-gzip' length 189794 bytes (185 KB)
==================================================
downloaded 185 KB
* installing *source* package ‘gsl’ ...
** package ‘gsl’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gsl-config... no
configure: error: gsl-config not found, is GSL installed?
ERROR: configuration failed for package ‘gsl’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/gsl’
Warning in install.packages :
installation of package ‘gsl’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/ll/dvpphrys0pddnjffq7zbl7vm0000gn/T/RtmpRUGsKi/downloaded_packages’
> library(copula)
Error: package or namespace load failed for ‘copula’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘gsl’
Download Homebrew then run
if(!require(pacman)) install.packages("pacman")
pacman::p_load(copula)
seems working for me :)

failed to update Rmarkdown version

I failed to load library(DataExplorer) because it says my Rmarkdown version is too old. but when I updated my Rmarkdown version, I got another error saying 'Rcpp' has non-zero exit status. I tried to remove 'Rcpp' but it says it does not exist.
> library(DataExplorer)
Error: package or namespace load failed for ‘DataExplorer’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rmarkdown’ 1.8 is already loaded, but >= 1.10 is required
> install_version('rmarkdown', version = '1.10')
Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/rmarkdown/rmarkdown_1.10.tar.gz
Installing 1 packages: Rcpp
trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_1.0.2.tar.gz'
Content type 'application/x-gzip' length 3699570 bytes (3.5 MB)
downloaded 3.5 MB
* installing *source* package 'Rcpp' ...
** package 'Rcpp' successfully unpacked and MD5 sums checked
** using staged installation
** libs
*** arch - i386
Error in system(cmd) : (converted from warning) 'make' not found
* removing 'C:/Users/qjia/Documents/R/R-3.6.1/library/Rcpp'
Error: Failed to install 'unknown package' from URL:
(converted from warning) installation of package ‘Rcpp’ had non-zero exit status
> remove.packages("Rcpp")
Removing package from ‘C:/Users/qjia/Documents/R/R-3.6.1/library’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘Rcpp’
to load DataExplorer sucessfully.

Unable to load the packages (ex: googlesheets)

I just installed the googlesheets package and later i called the library("googlesheets), but it could not executed and gave the error like :
library(googlesheets)
Error in library(googlesheets) :
there is no package called ‘googlesheets’.
Can any one help here
install.packages("googlesheets")
Installing package into ‘C:/Users/eduru.suresh/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is
later:
binary source needs_compilation
googlesheets 0.2.2 0.3.0 FALSE
installing the source package ‘googlesheets’
trying URL 'https://cran.rstudio.com/src/contrib/googlesheets_0.3.0.tar.gz'
Content type 'application/x-gzip' length 2187937 bytes (2.1 MB)
downloaded 2.1 MB
* installing *source* package 'googlesheets' ...
** package 'googlesheets' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'pillar'
ERROR: lazy loading failed for package 'googlesheets'
* removing 'C:/Users/eduru.suresh/Documents/R/win-library/3.3/googlesheets'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\eduru.suresh\Documents\R\win-library\3.3" C:\Users\EDURU~1.SUR\AppData\Local\Temp\RtmpEB1KKI/downloaded_packages/googlesheets_0.3.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘googlesheets’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\eduru.suresh\AppData\Local\Temp\RtmpEB1KKI\downloaded_packages’
> library(googlesheets)
Error in library(googlesheets) :
there is no package called ‘googlesheets’

R markdown won't load due to a missing package, 'backports', which also fails to download.

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’

R Package installed but cannot be loaded?

I installed the "digest" package in R.
> install.packages("digest")
Installing package into ‘C:/Users/user/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://mran.microsoft.com/snapshot/2017-03-15/bin/windows/contrib/3.3/digest_0.6.12.zip'
Content type 'application/zip' length 172746 bytes (168 KB)
downloaded 168 KB
package ‘digest’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘digest’
The downloaded binary packages are in
C:\Users\user\AppData\Local\Temp\RtmpaMPhK6\downloaded_packages
I confirmed that this package is installed in:
C:\Program Files\R\R-3.3.2\library\digest
My repos are:
getOption("repos")
CRAN CRANextra
"https://mran.microsoft.com/snapshot/2017-03-15" "http://www.stats.ox.ac.uk/pub/RWin"
Then I wanted to install "kableExtra" package. But I am getting an error message that the there is no "digest":
> library(kableExtra)
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘digest’
Error: package or namespace load failed for ‘kableExtra’
What is wrong? Is this due to the fact that the original library is from CRAn, but for some reason this "digest" package is coming from MRAN? How can I fix this?

Resources