Ошибка при попытке установить RGDAL в RSTUDIO - GDALAllRegister не найден в libgdal - PullRequest
0 голосов
/ 27 февраля 2020

Я пытаюсь установить RGDal в Rstudio и постоянно получаю сообщение об ошибке: Вот общий результат:

> install.packages('rgdal')
also installing the dependency ‘sp’

trying URL 'https://cran.rstudio.com/src/contrib/sp_1.4-0.tar.gz'
Content type 'application/x-gzip' length 1132614 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/src/contrib/rgdal_1.4-8.tar.gz'
Content type 'application/x-gzip' length 1698902 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

* installing *source* package ‘sp’ ...
** package ‘sp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/Users/allanporter/opt/anaconda3/envs/r_env/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/allanporter/opt/anaconda3/envs/r_env/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/allanporter/opt/anaconda3/envs/r_env/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/allanporter/opt/anaconda3/envs/r_env=/usr/local/src/conda-prefix  -c Rcentroid.c -o Rcentroid.o
x86_64-apple-darwin13.4.0-clang -I"/Users/allanporter/opt/anaconda3/envs/r_env/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/allanporter/opt/anaconda3/envs/r_env/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/allanporter/opt/anaconda3/envs/r_env/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/allanporter/opt/anaconda3/envs/r_env=/usr/local/src/conda-prefix  -c gcdist.c -o gcdist.o
x86_64-apple-darwin13.4.0-clang -I"/Users/allanporter/opt/anaconda3/envs/r_env/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/allanporter/opt/anaconda3/envs/r_env/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/allanporter/opt/anaconda3/envs/r_env/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/allanporter/opt/anaconda3/envs/r_env=/usr/local/src/conda-prefix  -c init.c -o init.o
x86_64-apple-darwin13.4.0-clang -I"/Users/allanporter/opt/anaconda3/envs/r_env/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/allanporter/opt/anaconda3/envs/r_env/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/allanporter/opt/anaconda3/envs/r_env/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/allanporter/opt/anaconda3/envs/r_env=/usr/local/src/conda-prefix  -c pip.c -o pip.o
x86_64-apple-darwin13.4.0-clang -I"/Users/allanporter/opt/anaconda3/envs/r_env/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/allanporter/opt/anaconda3/envs/r_env/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/allanporter/opt/anaconda3/envs/r_env/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/allanporter/opt/anaconda3/envs/r_env=/usr/local/src/conda-prefix  -c pip2.c -o pip2.o
x86_64-apple-darwin13.4.0-clang -I"/Users/allanporter/opt/anaconda3/envs/r_env/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/allanporter/opt/anaconda3/envs/r_env/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/allanporter/opt/anaconda3/envs/r_env/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/allanporter/opt/anaconda3/envs/r_env=/usr/local/src/conda-prefix  -c sp_xports.c -o sp_xports.o
x86_64-apple-darwin13.4.0-clang -I"/Users/allanporter/opt/anaconda3/envs/r_env/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/allanporter/opt/anaconda3/envs/r_env/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/allanporter/opt/anaconda3/envs/r_env/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/allanporter/opt/anaconda3/envs/r_env=/usr/local/src/conda-prefix  -c surfaceArea.c -o surfaceArea.o
x86_64-apple-darwin13.4.0-clang -I"/Users/allanporter/opt/anaconda3/envs/r_env/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/allanporter/opt/anaconda3/envs/r_env/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/allanporter/opt/anaconda3/envs/r_env/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/allanporter/opt/anaconda3/envs/r_env=/usr/local/src/conda-prefix  -c zerodist.c -o zerodist.o
x86_64-apple-darwin13.4.0-clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Users/allanporter/opt/anaconda3/envs/r_env/lib/R/lib -Wl,-dead_strip_dylibs -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/allanporter/opt/anaconda3/envs/r_env/lib -L/Users/allanporter/opt/anaconda3/envs/r_env/lib -o sp.dylib Rcentroid.o gcdist.o init.o pip.o pip2.o sp_xports.o surfaceArea.o zerodist.o -L/Users/allanporter/opt/anaconda3/envs/r_env/lib/R/lib -lR -Wl,-framework -Wl,CoreFoundation
ld: warning: -pie being ignored. It is only used when linking a main executable
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd
installing to /Users/allanporter/opt/anaconda3/envs/r_env/lib/R/library/00LOCK-sp/00new/sp/libs
** R
** data
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (sp)
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /Users/allanporter/opt/anaconda3/envs/r_env/lib/R
configure: CC: x86_64-apple-darwin13.4.0-clang
configure: CXX: x86_64-apple-darwin13.4.0-clang++
configure: C++11 support available
configure: rgdal: 1.4-7
checking for /usr/bin/svnversion... yes
configure: svn revision: 845
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.4.2
checking C++11 support for GDAL >= 2.3.0... yes
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5 or >= 3.0... yes
checking gdal: linking with --libs only... no
checking gdal: linking with --libs and --dep-libs... no
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ld: symbol dyld_stub_binder not found (normally in libSystem.dylib).  Needed to perform lazy binding to function _GDALAllRegister for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: directory not found for option '-L/usr/local/Cellar/libpq/11.5_1/lib'
ld: warning: directory not found for option '-L/usr/local/Cellar/libdap/3.20.4_1/lib64'
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpthread.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpthread.tbd
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpq.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpq.tbd
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libdl.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libdl.tbd
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks//OpenCL.framework/OpenCL.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks//OpenCL.framework/OpenCL.tbd
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ld: symbol dyld_stub_binder not found (normally in libSystem.dylib).  Needed to perform lazy binding to function _GDALAllRegister for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
configure: Install failure: compilation and/or linkage problems.
configure: error: GDALAllRegister not found in libgdal.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/Users/allanporter/opt/anaconda3/envs/r_env/lib/R/library/rgdal’
Warning in install.packages :
  installation of package ‘rgdal’ had non-zero exit status

Любая помощь или идеи будут оценены, спасибо!

Примечание что я также ранее установил gdal и proj4, чтобы не было ошибки. Кроме того, мой Rstudio находится в Анаконде, если это поможет.
Также я попробовал решение, опубликованное в этом посте - Установите библиотеку rgdal в rstudio - GDALAllRegister не найден в libgdal , но у меня это не сработало. Когда я печатаю в терминал g ++ - я получаю clang: error: нет входных файлов.

...