테라 설치에 어려움을 겪고 있습니다. 완료하기 위해 Google에서 찾은 모든 힌트를 시도했지만 이 오류 메시지는 바뀌지 않았습니다. 잘 이해했다면 'terra' 종속성으로 rgdal이 필요하지만 terra 또는 rgdal을 설치하려고 하면 동일한 메시지가 나타납니다. pip, conda를 통해 제거, 재설치, 설치를 시도했지만 아무것도 작동하지 않습니다. 나는 매우 절망적입니다. gdal은 Brew를 통해 설치됩니다
gdal-config --version
.3.5.0
R에 로그인:
> install.packages("terra")
Installation du package dans ‘/home/col1/R/x86_64-pc-linux-gnu-library/4.2’
(car ‘lib’ n'est pas spécifié)
essai de l'URL 'https://cloud.r-project.org/src/contrib/terra_1.5-34.tar.gz'
Content type 'application/x-gzip' length 667829 bytes (652 KB)
==================================================
downloaded 652 KB
* installing *source* package ‘terra’ ...
** package ‘terra’ correctement décompressé et sommes MD5 vérifiées
** using staged installation
configure: CC: gcc
configure: CXX: g++ -std=gnu++11
checking for gdal-config... /home/linuxbrew/.linuxbrew/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.5.0
checking GDAL version >= 2.0.1... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking GDAL: linking with --libs only... no
checking GDAL: linking with --libs and --dep-libs... no
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gdal/3.5.0_1/lib/libgdal.so: undefined reference to `opj_decoder_set_strict_mode'
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gdal/3.5.0_1/lib/libgdal.so: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gdal/3.5.0_1/lib/libgdal.so: undefined reference to `opj_encoder_set_extra_options'
collect2: error: ld returned 1 exit status
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gdal/3.5.0_1/lib/libgdal.so: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
collect2: error: ld returned 1 exit status
configure: Install failure: compilation and/or linkage problems.
configure: error: GDALAllRegister not found in libgdal.
ERROR: configuration failed for package ‘terra’
* removing ‘/home/col1/R/x86_64-pc-linux-gnu-library/4.2/terra’
Warning in install.packages :
l'installation du package ‘terra’ a eu un statut de sortie non nul
Les packages source téléchargés sont dans
‘/tmp/RtmpaCYwto/downloaded_packages’
누구든지 단서가 있다면 정말 감사하겠습니다.