Install R package 'rgdal' and its external dependencies offline on windows - r

My work laptop has no internet access and I am trying to download the package rgdal.
I have downloaded rgdal_1.4-8.tar.gz, gdal-3.0.4.tar.gz and proj-6.3.2.tar.gz. I tried intalling them via source separately using:
install.packages('.../...tar.gz', type='source', repos=NULL)
but it did not work. Here are the error messages
ERROR: cannot extract package from 'D:/Users/sn/Documents/R source packages/gdal-3.0.4.tar.gz'
Warning in install.packages :
installation of package ‘D:/Users/sn/Documents/R source packages/gdal-3.0.4.tar.gz’ had non-zero exit status
ERROR: cannot extract package from 'D:/Users/sn/Documents/R source packages/proj-6.3.2.tar.gz'
Warning in install.packages :
installation of package ‘D:/Users/sn/Documents/R source packages/proj-6.3.2.tar.gz’ had non-zero exit status
Error in download.file(sprintf("https://github.com/rwinlib/gdal2/archive/v%s.zip", :
cannot open URL 'https://github.com/rwinlib/gdal2/archive/v2.2.3.zip'
In addition: Warning message:
In download.file(sprintf("https://github.com/rwinlib/gdal2/archive/v%s.zip", :
InternetOpenUrl failed: 'A connection with the server could not be established'
Execution halted
make: *** [Makevars.win:27: winlibs] Error 1
ERROR: compilation failed for package 'rgdal'
* removing 'D:/Users/sn/Documents/R/win-library/3.6/rgdal'
Warning in install.packages :
installation of package ‘D:/Users/sn/Documents/R source packages/rgdal_1.4-8.tar.gz’ had non-zero exit status

Related

Error when downloading sjPlot package in R

I keep getting an error message when trying to download sjPlot (removed part of mu directory)
ERROR: lazy loading failed for package ‘sjPlot’
* removing ‘/Users/Library/R/4.0/library/sjPlot’
Warning in install.packages :
installation of package ‘sjPlot’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/t7/__d172j90w1gp2cdfnyz8j180000gn/T/RtmpcHqFgR/downloaded_packages’
This is what I did:
install.packages("sjPlot")

Problem installing LambertW package for R

I'm trying to install the LambertW package for R (or any package that will give me the Lambert W function). Everytime I try:
install.packages("LambertW")
I get this output...
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error in read_r_config(sprintf("%sFLAGS", cxx), envir = NULL)[[1]] :
subscript out of bounds
Calls: source_file -> eval -> eval
Execution halted
ERROR: configuration failed for package ‘RcppParallel’
* removing ‘/usr/local/lib/R/3.6/site-library/RcppParallel’
Warning in install.packages :
installation of package ‘RcppParallel’ had non-zero exit status
ERROR: dependency ‘RcppParallel’ is not available for package ‘lamW’
* removing ‘/usr/local/lib/R/3.6/site-library/lamW’
Warning in install.packages :
installation of package ‘lamW’ had non-zero exit status
ERROR: dependency ‘lamW’ is not available for package ‘LambertW’
* removing ‘/usr/local/lib/R/3.6/site-library/LambertW’
Warning in install.packages :
installation of package ‘LambertW’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/4m/qkbb2hwd1t12v_11mjcphv300000gn/T/RtmpcUm3LQ/downloaded_packages’
Then if I try to load it using library I get this
library("LambertW")
Error in library("LambertW") : there is no package called ‘LambertW’
Does anyone know how to solve this?

Receiving "package had non-zero exit status" when installing packages on campus Rstudio server?

I'm trying to install ggplot2 on my campus' Rstudio server. Unfortunately I receive the classic "installation of package 'ggplot2' had non-zero exit status." I've looked through the many threads of users who've had the same problem with other packages, but haven't found any workable solutions.
I've tried using install.packages("ggplot2", dependencies = TRUE), which hasn't worked.
Also, I'm running the most recent version of OSX on a MacBook Pro.
This is the error message I receive:
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/mnt/trafficstop/jrleary/R/x86_64-redhat-linux-gnu-library/3.5/vctrs’
Warning in install.packages :
installation of package ‘vctrs’ had non-zero exit status
ERROR: dependency ‘vctrs’ is not available for package ‘pillar’
* removing ‘/mnt/trafficstop/jrleary/R/x86_64-redhat-linux-gnu-library/3.5/pillar’
Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
ERROR: dependency ‘pillar’ is not available for package ‘tibble’
* removing ‘/mnt/trafficstop/jrleary/R/x86_64-redhat-linux-gnu-library/3.5/tibble’
Warning in install.packages :
installation of package ‘tibble’ had non-zero exit status
ERROR: dependency ‘tibble’ is not available for package ‘ggplot2’
* removing ‘/mnt/trafficstop/jrleary/R/x86_64-redhat-linux-gnu-library/3.5/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status

Error: installation of package ‘ranger’ had non-zero exit status

I am experiencing great difficulties in installing the package ranger. Here is the error message that I am getting:
ERROR: compilation failed for package ‘ranger’
* removing ‘/home/ibraim/R/x86_64-pc-linux-gnu-library/3.5/ranger’
Warning in install.packages :
installation of package ‘ranger’ had non-zero exit status
I also tried the installation by using devtools, which did not work. Do you have any suggestion how to solve this problem?

Failing to install "ez" package in R Studio

I'm currently unable to install the ez package in R studio 1.1.456 on macbook. Here is what I am getting:
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [init.o] Error 127
ERROR: compilation failed for package 'zip'
* removing '/anaconda3/lib/R/library/zip'
Warning in install.packages :
installation of package 'zip' had non-zero exit status
ERROR: compilation failed for package 'SparseM'
* removing '/anaconda3/lib/R/library/SparseM'
Warning in install.packages :
installation of package 'SparseM' had non-zero exit status
Warning in install.packages :
installation of package 'ez' had non-zero exit status

Resources