Hi. I have problems downloading the terra package. The message is:
Warning in install.packages :
downloaded length 54617208 != reported length 96919656
Warning in install.packages :
URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/terra_1.4-22.tgz ': Timeout of 60 seconds was reached
Error in download.file(url, destfile, method, mode = "wb", ...) :
download from 'https://cran.rstudio.com/bin/macosx/contrib/4.1/terra_1.4-22.tgz ' failed
Warning in install.packages :
download of package ‘terra’ failed
I already close all files on my RStudio hoping that it would be solved but the issue remains the same.
I am waiting for any helps toward this.
Thank you.
tessaulaen:
terra package
Check the GitHub infomation.
If you have Windows you need first install RTools. You need the "raster" , "Rcpp" and "
remotes" packages. Next install "terra" from github.
Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = "true")
remotes::install_github("rspatial/terra")
I tried this but it doesn't solve. Do you have any solutions?
This seems like a connectivity issue, R is not being able to complete the download from the CRAN repository you have selected, these are some things to try.
Choose a different CRAN repository, RStudios repository is a good choice (http://cran.rstudio.com/ ) or you could choose one that is geographically closer to you.
Disable secure download setting.
Check if your internet connection has traffic restrictions of some kind, like a firewall, proxy server, etc. This is usually the case when you are at work or school.
I already changed my CRAN repository to my country's but I still face the same problem. Also, I already checked my internet and it is good since I check the connection on both laptop and phone but the package cannot be downloaded.
Check this other problems:
opened 08:42PM - 18 May 20 UTC
closed 03:30AM - 04 Jun 20 UTC
When trying to update terra from 0.5-8 0.6-8 (from source) I got the following… error:
gdalio.cpp:204:30: error: use of undeclared identifier 'GDALGetSpatialRef'; did you mean 'OGR_L_GetSpatialRef'?
OGRSpatialReferenceH srs = GDALGetSpatialRef( hDS );
^~~~~~~~~~~~~~~~~
OGR_L_GetSpatialRef
/usr/local/Cellar/gdal/2.4.4_4/include/ogr_api.h:584:30: note: 'OGR_L_GetSpatialRef' declared here
OGRSpatialReferenceH CPL_DLL OGR_L_GetSpatialRef( OGRLayerH );
^
gdalio.cpp:207:16: error: use of undeclared identifier 'OSRExportToWktEx'; did you mean 'OSRExportToXML'?
OGRErr err = OSRExportToWktEx(srs, &cp, options);
^~~~~~~~~~~~~~~~
OSRExportToXML
/usr/local/Cellar/gdal/2.4.4_4/include/ogr_srs_api.h:530:16: note: 'OSRExportToXML' declared here
OGRErr CPL_DLL OSRExportToXML( OGRSpatialReferenceH, char **, const char * );
^
gdalio.cpp:207:43: error: cannot initialize a parameter of type 'const char *' with an lvalue of type 'const char *[3]'
OGRErr err = OSRExportToWktEx(srs, &cp, options);
^~~~~~~
/usr/local/Cellar/gdal/2.4.4_4/include/ogr_srs_api.h:530:76: note: passing argument to parameter here
OGRErr CPL_DLL OSRExportToXML( OGRSpatialReferenceH, char **, const char * );
^
3 errors generated.
make: *** [gdalio.o] Error 1
ERROR: compilation failed for package ‘terra’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/terra’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/terra’
Warning in install.packages :
installation of package ‘terra’ had non-zero exit status
How can I fix the error and update the package.
Manuel
May be update GDAL/PROJ.
But is very extranger this problem.
I think that you need update all the librarys or try whit RCloud.
@M_AcostaCH , in this case the installation process never actually starts because the download fails so the issues you are referencing are not relevant to this situation, or at least not yet.
system
Closed
December 24, 2021, 12:54pm
8
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.