Failing to install "ez" package in R Studio - r

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

Related

Non-zero exit status package installation error on RStudio server

I've been trying to run an LGCP in 'inlabru' that was taking forever so I've been set up with a Unix account to access an RStudio server. The trouble is now I am getting non-zero exit status installation errors for a few packages. Specifically 'rgdal' and 'inlabru'. I have tried (for 'rgdal') installing the dependencies and PROJ/GDAL without any success. The end of the error is:
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘svglite’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/svglite’
Warning in install.packages :
installation of package ‘svglite’ had non-zero exit status
ERROR: dependency ‘terra’ is not available for package ‘raster’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/raster’
Warning in install.packages :
installation of package ‘raster’ had non-zero exit status
ERROR: dependencies ‘s2’, ‘units’ are not available for package ‘sf’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
ERROR: dependency ‘raster’ is not available for package ‘leaflet’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/leaflet’
Warning in install.packages :
installation of package ‘leaflet’ had non-zero exit status
ERROR: dependencies ‘sf’, ‘svglite’ are not available for package ‘leafpop’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/leafpop’
Warning in install.packages :
installation of package ‘leafpop’ had non-zero exit status
ERROR: dependencies ‘raster’, ‘terra’ are not available for package ‘satellite’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/satellite’
Warning in install.packages :
installation of package ‘satellite’ had non-zero exit status
ERROR: dependencies ‘leaflet’, ‘raster’, ‘sf’ are not available for package ‘leafem’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/leafem’
Warning in install.packages :
installation of package ‘leafem’ had non-zero exit status
ERROR: dependencies ‘leafem’, ‘leaflet’, ‘leafpop’, ‘raster’, ‘satellite’, ‘sf’ are not available for package ‘mapview’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/mapview’
Warning in install.packages :
installation of package ‘mapview’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp57pHoc/downloaded_packages’
I am thinking it is the library that is failing the installation because it's a server, but I've tried changing .libPaths() to a folder on my drive with no success. I have also tried running
install.packages("rgdal", type="source", repos="http://R-Forge.R-project.org", configure.args=c('--with-gdal-config=/opt/local/bin/gdal-config'))
and get
configure: error: gdal-config not found - configure argument error.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp57pHoc/downloaded_packages’
Any help is greatly appreciated!
gdal (and friends) are not installed
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev

r can't install rstan r version 4.1.0 ubuntu 20.04.2

I'm having trouble installing rstan in R. I've tried using install.packages() (and the package installer) and get the following error:
/home/linuxbrew/.linuxbrew/bin/ld: cannot find -llapack
/home/linuxbrew/.linuxbrew/bin/ld: cannot find -lblas
/home/linuxbrew/.linuxbrew/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:10: RcppEigen.so] Error 1
ERROR: compilation failed for package ‘RcppEigen’
* removing ‘/home/dave/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen’
Warning in install.packages :
installation of package ‘RcppEigen’ had non-zero exit status
ERROR: dependency ‘RcppEigen’ is not available for package ‘StanHeaders’
* removing ‘/home/dave/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders’
Warning in install.packages :
installation of package ‘StanHeaders’ had non-zero exit status
ERROR: dependencies ‘StanHeaders’, ‘RcppEigen’ are not available for package ‘rstan’
* removing ‘/home/dave/R/x86_64-pc-linux-gnu-library/4.1/rstan’
Warning in install.packages:
installation of package ‘rstan’ had non-zero exit status

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

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

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

tsoutliers dependency issue: dependency KFKSDS has non-zero exit status?

While working on outlier detection on a time series data. I came across [tsoutliers][1] packages that does implement Chen and Liu's time series outlier detection. But I am unable to install tsoutliers in R
install.packages("tsoutliers")
I am getting the following dependency errors
In file included from KF-deriv.cpp:1:0: KFKSDS.h:14:28: fatal error:
gsl/gsl_vector.h: No such file or directory compilation terminated.
/usr/lib/R/etc/Makeconf:143: recipe for target 'KF-deriv.o' failed
make: *** [KF-deriv.o] Error 1 ERROR: compilation failed for package
‘KFKSDS’
* removing ‘/home/atoffy/R/x86_64-pc-linux-gnu-library/3.2/KFKSDS’ Warning in install.packages : installation of package ‘KFKSDS’ had
non-zero exit status ERROR: dependency ‘KFKSDS’ is not available for
package ‘stsm’
* removing ‘/home/atoffy/R/x86_64-pc-linux-gnu-library/3.2/stsm’ Warning in install.packages : installation of package ‘stsm’ had
non-zero exit status ERROR: dependencies ‘stsm’, ‘KFKSDS’ are not
available for package ‘tsoutliers’
* removing ‘/home/atoffy/R/x86_64-pc-linux-gnu-library/3.2/tsoutliers’ Warning in install.packages : installation of package ‘tsoutliers’
had non-zero exit status
More specifically
recipe for target 'KF-deriv.o' failed
Can anyone help me to install the same?
I was able to solve the same by installing
libgsl0
sudo apt-get install libgsl0-dev

Resources