rdotsch / rcicr

Reverse correlation image classification using R
9 stars 12 forks source link

couldn't install the pacakge #120

Closed baixx062 closed 1 year ago

baixx062 commented 2 years ago

Hi there, I tried installing it with the command devtools::install_github('rdotsch/rcicr'), but then it gave the following error code, and doesn't allow me to install it properly. Help?

devtools::install_github('rdotsch/rcicr') Downloading GitHub repo rdotsch/rcicr@HEAD Installing 2 packages: terra, raster Installing packages into ‘/Users/HB/Library/R/4.0/library’ (as ‘lib’ is unspecified)

There are binary versions available but the source versions are later: binary source needs_compilation terra 1.5-21 1.6-17 TRUE raster 3.5-15 3.6-3 TRUE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) Yes installing the source packages ‘terra’, ‘raster’

trying URL 'https://cran.rstudio.com/src/contrib/terra_1.6-17.tar.gz' Content type 'application/x-gzip' length 698382 bytes (682 KB)

downloaded 682 KB

trying URL 'https://cran.rstudio.com/src/contrib/raster_3.6-3.tar.gz' Content type 'application/x-gzip' length 579228 bytes (565 KB)

downloaded 565 KB

The downloaded source packages are in ‘/private/var/folders/1l/xn8kvlz17l7093wyjt4ndn440000gs/T/RtmpgibtVb/downloaded_packages’ ✓ checking for file ‘/private/var/folders/1l/xn8kvlz17l7093wyjt4ndn440000gs/T/RtmpgibtVb/remotes9699110bb987/rdotsch-rcicr-02c33b9/DESCRIPTION’ ... ─ preparing ‘rcicr’: ✓ checking DESCRIPTION meta-information ... ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories ─ building ‘rcicr_1.0.0.tar.gz’

Installing package into ‘/Users/HB/Library/R/4.0/library’ (as ‘lib’ is unspecified) ERROR: dependency ‘raster’ is not available for package ‘rcicr’

rdotsch commented 2 years ago

Looks like this is an issue of the terra package which is an indirect dependency. You may try to install a previous version of that package prior to installing rcicr. Hopefully this issue will get fixed by the terra developers soon.

rdotsch commented 1 year ago

I can't replicate this error today, so I am assuming that the terra package has been updated. Closing this issue.

marek1n commented 1 year ago

as the error states, terra requires a gdal installation e.g. simply brew install gdal solved this for me