- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试安装包 sf,但没有成功。
首先,我认为问题与库 GDAL、GEOS 和 PROJ 有关,但它们都已安装并被安装过程识别,如下所示:
install.packages("sf")
Installing package into ‘/home/aliton/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/sf_0.9-8.tar.gz'
Content type 'application/x-gzip' length 4213253 bytes (4.0 MB)
==================================================
downloaded 4.0 MB
* installing *source* package ‘sf’ ...
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc -std=gnu99
configure: CXX: g++ -std=gnu++11
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.0.1
checking GDAL version >= 2.0.1... yes
checking for gcc... gcc -std=gnu99
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 -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /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... yes
checking GDAL: /usr/local/share/gdal/pcs.csv readable... yes
checking GDAL: checking whether PROJ is available for linking:... yes
checking GDAL: checking whether PROJ is available fur running:... yes
configure: GDAL: 2.0.1
checking proj.h usability... no
checking proj.h presence... no
checking for proj.h... no
checking proj_api.h usability... yes
checking proj_api.h presence... yes
checking for proj_api.h... yes
checking for pj_init_plus in -lproj... yes
checking PROJ: epsg found and readable... yes
checking for geos-config... /usr/bin/geos-config
checking geos-config usability... yes
configure: GEOS: 3.4.2
checking GEOS version >= 3.4.0... yes
checking geos_c.h usability... yes
checking geos_c.h presence... yes
checking for geos_c.h... yes
checking geos: linking with -L/usr/lib -lgeos_c... yes
configure: Package CPP flags: -I/usr/local/include -I/usr/include
configure: Package LIBS: -L/usr/local/lib -lgdal -lproj -L/usr/local/lib -lgdal -L/usr/lib -lgeos_c
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c bbox.cpp -o bbox.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c gdal.cpp -o gdal.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c gdal_geom.cpp -o gdal_geom.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c gdal_read.cpp -o gdal_read.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c gdal_utils.cpp -o gdal_utils.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c gdal_write.cpp -o gdal_write.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c geos.cpp -o geos.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c hex.cpp -o hex.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ops.cpp -o ops.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c polygonize.cpp -o polygonize.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c proj.cpp -o proj.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c proj_info.cpp -o proj_info.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c raster2sf.cpp -o raster2sf.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c sfg.cpp -o sfg.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c signed_area.cpp -o signed_area.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c stars.cpp -o stars.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c wkb.cpp -o wkb.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c zm_range.cpp -o zm_range.o
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o sf.so RcppExports.o bbox.o gdal.o gdal_geom.o gdal_read.o gdal_utils.o gdal_write.o geos.o hex.o ops.o polygonize.o proj.o proj_info.o raster2sf.o sfg.o signed_area.o stars.o wkb.o zm_range.o -L/usr/local/lib -lgdal -lproj -L/usr/local/lib -lgdal -L/usr/lib -lgeos_c -L/usr/lib/R/lib -lR
installing to /home/aliton/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-sf/00new/sf/libs
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
in method for ‘dbWriteTable’ with signature ‘"PostgreSQLConnection","character","sf"’: no definition for class “PostgreSQLConnection”
in method for ‘dbDataType’ with signature ‘"PostgreSQLConnection","sf"’: no definition for class “PostgreSQLConnection”
in method for ‘coerce’ with signature ‘"Spatial","sf"’: no definition for class “Spatial”
in method for ‘coerce’ with signature ‘"Spatial","sfc"’: no definition for class “Spatial”
in method for ‘coerce’ with signature ‘"sf","Spatial"’: no definition for class “Spatial”
in method for ‘coerce’ with signature ‘"sfc","Spatial"’: no definition for class “Spatial”
in method for ‘coerce’ with signature ‘"XY","Spatial"’: no definition for class “Spatial”
in method for ‘coerce’ with signature ‘"crs","CRS"’: no definition for class “CRS”
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘sf’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-sf/00new/sf/libs/sf.so':
/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-sf/00new/sf/libs/sf.so: undefined symbol: _Z17CPL_gdalrasterizeN4Rcpp6VectorILi16ENS_15PreserveStorageEEES2_S2_S2_S2_bb
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpLiPeTF/downloaded_packages’
它似乎无法加载它自己应该创建的临时文件 (sf.so)。
─ Session info ─────────────────────────────────────────────────────────────────
setting value
version R version 3.6.3 (2020-02-29)
os Ubuntu 14.04.5 LTS
system x86_64, linux-gnu
ui RStudio
language en_US
collate en_US.UTF-8
ctype en_US.UTF-8
tz America/Maceio
date 2021-04-16
如何让它发挥作用?感谢您的帮助。
附加信息
我安装了 rgdal
包,它还显示 GDAL 已安装并与 GEOS 链接。
library(rgdal)
Loading required package: sp
rgdal: version: 1.5-23, (SVN revision 1121)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 2.0.1, released 2015/09/15
Path to GDAL shared files: /usr/local/share/gdal
GDAL binary built with GEOS: TRUE
Loaded PROJ runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
Path to PROJ shared files: (autodetected)
Linking to sp version:1.4-5
我不知道如何验证我安装了多少个版本的 GDAL、GEOS 和/或 PROJ,但我似乎安装了多个版本,这可能是导致问题的原因。我在 github issues #815 上找到了这个命令
aliton@aliton:/usr/share/proj$ ldconfig -p | grep gdal
libgdal.so.20 (libc6,x86-64) => /usr/local/lib/libgdal.so.20
libgdal.so.1 (libc6,x86-64) => /usr/lib/libgdal.so.1
libgdal.so (libc6,x86-64) => /usr/local/lib/libgdal.so
libgdal.so (libc6,x86-64) => /usr/lib/libgdal.so
aliton@aliton:/usr/share/proj$ ldconfig -p | grep geos
libgeos_c.so.1 (libc6,x86-64) => /usr/lib/libgeos_c.so.1
libgeos_c.so (libc6,x86-64) => /usr/lib/libgeos_c.so
libgeos-3.4.2.so (libc6,x86-64) => /usr/lib/libgeos-3.4.2.so
在错误完成安装之前,我复制了整个“sf”文件夹并键入以下命令:
aliton@aliton:~$ ldd /home/aliton/installers/00LOCK-sf/00new/sf/libs/sf.so
linux-vdso.so.1 => (0x00007fff7c632000)
libgdal.so.20 => /usr/local/lib/libgdal.so.20 (0x00007fe196e10000)
libproj.so.0 => /usr/lib/libproj.so.0 (0x00007fe196bbe000)
libgeos_c.so.1 => /usr/lib/libgeos_c.so.1 (0x00007fe19699a000)
libR.so => /usr/lib/libR.so (0x00007fe19631a000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe196004000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe195cfe000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe195ae5000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe19571c000)
libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fe195463000)
libodbc.so.1 => /usr/lib/x86_64-linux-gnu/libodbc.so.1 (0x00007fe1951fb000)
libodbcinst.so.1 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.1 (0x00007fe194fe9000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fe194dbf000)
libxerces-c-3.1.so => /usr/lib/x86_64-linux-gnu/libxerces-c-3.1.so (0x00007fe194836000)
libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007fe1945de000)
libnetcdf.so.7 => /usr/lib/libnetcdf.so.7 (0x00007fe1942a1000)
libhdf5.so.7 => /usr/lib/x86_64-linux-gnu/libhdf5.so.7 (0x00007fe193e0c000)
libmfhdfalt.so.0 => /usr/lib/libmfhdfalt.so.0 (0x00007fe193bdb000)
libdfalt.so.0 => /usr/lib/libdfalt.so.0 (0x00007fe1938f5000)
libgif.so.4 => /usr/lib/x86_64-linux-gnu/libgif.so.4 (0x00007fe1936eb000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007fe193496000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007fe193223000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fe192ffc000)
libpq.so.5 => /usr/lib/libpq.so.5 (0x00007fe192dcd000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fe192bb4000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe192995000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe192791000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fe192553000)
libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007fe1922f0000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007fe191f89000)
libgeos-3.4.2.so => /usr/lib/libgeos-3.4.2.so (0x00007fe191c04000)
libblas.so.3 => /usr/lib/libblas.so.3 (0x00007fe191638000)
libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 (0x00007fe1913f2000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fe1911cf000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fe190fbf000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe190db7000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007fe190b87000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe1980d2000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fe19097d000)
libhdf5_hl.so.7 => /usr/lib/x86_64-linux-gnu/libhdf5_hl.so.7 (0x00007fe19074c000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007fe19053e000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007fe1902de000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007fe18ff02000)
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fe18fc37000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fe18fa32000)
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fe18f7eb000)
libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007fe18f59a000)
libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007fe18f366000)
librtmp.so.0 => /usr/lib/x86_64-linux-gnu/librtmp.so.0 (0x00007fe18f14c000)
libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11 (0x00007fe18eecc000)
libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26 (0x00007fe18ec0c000)
liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007fe18e9fd000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007fe18e6d5000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fe18e4ac000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fe18e27c000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fe18e071000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fe18de6d000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fe18dc51000)
libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007fe18da36000)
libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007fe18d7f8000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fe18d5f2000)
libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fe18d3de000)
libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fe18d19b000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007fe18cf5b000)
libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007fe18cd51000)
libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007fe18cac9000)
libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007fe18c828000)
libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007fe18c5f4000)
libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007fe18c3df000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fe18c1d7000)
libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007fe18bfad000)
libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007fe18bd9f000)
libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007fe18bb56000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007fe18b91c000)
我以某种方式设法使用以下命令识别了两个版本的 GDAL:
aliton@aliton:~$ locate gdal-config
/usr/bin/gdal-config
/usr/local/bin/gdal-config
/usr/share/man/man1/gdal-config.1.gz
/usr/bin/gdal-config
是 version 1.10.1 而 /usr/local/bin/gdal-config
是版本 2.0.1
> install.packages("sf", configure.args = "--with-gdal-config=/usr/bin/gdal-config")
Installing package into ‘/home/aliton/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/sf_0.9-8.tar.gz'
Content type 'application/x-gzip' length 4213253 bytes (4.0 MB)
==================================================
downloaded 4.0 MB
* installing *source* package ‘sf’ ...
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc -std=gnu99
configure: CXX: g++ -std=gnu++11
configure: gdal-config set to /usr/bin/gdal-config
checking gdal-config exists... yes
checking gdal-config executable... yes
checking gdal-config usability... yes
configure: GDAL: 1.10.1
checking GDAL version >= 2.0.1... no
configure: error: sf is not compatible with GDAL versions below 2.0.1
ERROR: configuration failed for package ‘sf’
* removing ‘/home/aliton/R/x86_64-pc-linux-gnu-library/3.6/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmplreAgs/downloaded_packages’
我还找到了一种在 /usr/local/lib/libgdal.so
中查找符号的方法,实际上没有名为 _Z17CPL_gdalrasterizeN4Rcpp6VectorILi16ENS_15PreserveStorageEEES2_S2_S2_S2_bb
的符号。
我发现的唯一相似符号是:
aliton@aliton:~$ nm -g /usr/local/lib/libgdal.so | grep _Z17CPL
000000000070e710 T _Z17CPLHaveRuntimeAVXv
000000000070e700 T _Z17CPLHaveRuntimeSSEv
000000000042e8e0 T _Z17CPLHTTPFetchMultiP14CPLHTTPRequestiPKPKc
00000000006cc240 T _Z17CPLHTTPSetOptionsPvPPc
00000000006d67d0 T _Z17CPLReinitAllMutexv
相比于:
aliton@aliton:~$ nm -g /home/aliton/installers/00LOCK-sf/00new/sf/libs/sf.so | grep _Z17CPL
000000000004e0f0 T _Z17CPL_gdalnearblackN4Rcpp6VectorILi16ENS_15PreserveStorageEEES2_S2_S2_S2_
U _Z17CPL_gdalnearblackN4Rcpp6VectorILi16ENS_15PreserveStorageEEES2_S2_S2_S2_b
000000000004e0a0 T _Z17CPL_gdalrasterizeN4Rcpp6VectorILi16ENS_15PreserveStorageEEES2_S2_S2_S2_b
U _Z17CPL_gdalrasterizeN4Rcpp6VectorILi16ENS_15PreserveStorageEEES2_S2_S2_S2_bb
000000000004e0b0 T _Z17CPL_gdaltranslateN4Rcpp6VectorILi16ENS_15PreserveStorageEEES2_S2_S2_
U _Z17CPL_gdaltranslateN4Rcpp6VectorILi16ENS_15PreserveStorageEEES2_S2_S2_b
0000000000055cd0 T _Z17CPL_geos_is_emptyN4Rcpp6VectorILi19ENS_15PreserveStorageEEE
00000000000558d0 T _Z17CPL_geos_is_validN4Rcpp6VectorILi19ENS_15PreserveStorageEEEb
0000000000064e00 T _Z17CPL_get_pipelinesN4Rcpp6VectorILi16ENS_15PreserveStorageEEES2_NS0_ILi14ES1_EES2_S2_dbb
00000000000643b0 T _Z17CPL_proj_is_validSs
0000000000041a80 T _Z17CPL_wrap_datelineN4Rcpp6VectorILi19ENS_15PreserveStorageEEENS0_ILi16ES1_EEb
最佳答案
我遇到了和你一样的问题。我找到的解决方案是重新启动 R 并运行以下命令(可能在删除 SF 包之后):
install.packages("Rcpp")
library(Rcpp)
install.packages("sf")
library(sf)
关于r - 错误 : package or namespace load failed for ‘sf’ ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67133013/
“Fail Early”是什么意思,在什么情况下这种方法最有用,你什么时候会避免这种方法? 最佳答案 本质上,快速失败 (又名 尽早失败 )是对您的软件进行编码,使得 当出现问题时,软件会尽快并尽可能
/* * 115200. Connect GPIO 0 of your ESP8266 to VCC and reset the board */ #include #include #inc
安装并注册 gitlab-runner 后,当我运行时 gitlab-runner start我收到此错误消息。这是什么原因? Runtime platform
我一直在尝试Windows Server 2016 TP5上的Windows容器。突然我在运行带有端口映射选项-p 80:80的容器时开始出错 c:\>docker run -it -p 80:80
我一直在关注 Hyperledger Fabric Multi-Org setup 的教程,我能够成功地做到这一点。现在我想根据我想要的组织名称对其进行自定义,并且在尝试连接网络时遇到以下错误。希望有
所以我不知道为什么这个测试失败了。当我运行 repl 中的语句时,一切似乎都正常工作,但 fiveam 测试失败。 以下要点中有一个测试用例:https://gist.github.com/Puerc
我安装了 Android Studio 1.2.1.1、Gradle 版本 2.2.1 和 Android 插件版本 1.2.3。我试图创建一个简单的 hello world 项目,它给了我一个构建失
我正在尝试设置一个简单的 WebTestCase,它使用 Symfony 4(和 "phpunit/phpunit": "^6.5")。但是,测试失败: Failed to start the ses
我已经使用 git clone 在本地克隆了一个包含 Vue 项目的 git 存储库. 然后我跑了npm install安装依赖项并获得 node_modules文件夹。 正在运行 npm run s
我有:http://windows.github.com/ 我当前的项目有大约 20k 个文件,大约 150MB(并且不说它有多慢而且我现在什么也做不了)它甚至不允许我提交!我收到此错误:提交失败:无
我正在使用 RxAndroidBle 库开发一个应用程序,该库大约每 30 秒定期执行 BLE 扫描,每分钟左右执行一些 BLE 操作。几个小时后,通常在 5 到 24 小时之间,扫描停止工作。每次应
每次我尝试使用 Pycharm 推送 GitHub 中的存储库时,它都会失败。 Push failed: fatal: Authentication failed for 'https://githu
此外,管理内置“管理结构”(如标题中的结构)的 Resque 的最佳实践是什么?我应该用 jedis.del(String key) 或类似的东西清除它们吗? 最佳答案 resque:failed 是
想象这样一种场景,我们想要在对“foo”和“bar”的并发请求成功完成后做一些事情,或者如果其中一个或两个失败则报告错误: $.when($.getJSON('foo'), $.getJSON('ba
这就是我所做的: 我使用的是 Windows XP SP3 我已经安装了 Python 2.7.1。 我下载了instantclient-basic-nt-11.2.0.3.0.zip,解压后放入C:
我已经设置了一个 vfsstream block 设备,我正在尝试对其调用 file_get_contents()。然而,对 vfsStreamWrapper::stream_open 的调用失败,因
我正在尝试在我的 React 应用程序中使用文件上传功能,但遇到了问题。当我尝试上传第一张图片时,它工作得很好。文件资源管理器对话框关闭并显示我的图片。用我的文件资源管理器中的另一张图片覆盖图片也可以
目标:将我的本地 mongodb 数据迁移到 mongodb atlas 集群。 尝试: 1.将本地数据导出为json。 2.导入json到集群。 操作系统:Linuxmint 19.1 Cinnam
我一直在从事一个需要在服务器(托管在 GCE 上)和多个客户端之间进行一些网络连接的项目。我创建了一个 Compute Engine 实例来运行 Python 脚本,如以下视频所示:https://w
我正在尝试使用 sqlx crate 和 Postgres 数据库连接到 Rust 中的数据库。 main.rs: use dotenv; use sqlx::Pool; use sqlx::PgPo
我是一名优秀的程序员,十分优秀!