在尝试安装sf
R软件包时,出现错误消息:
checking GDAL version >= 2.0.0... no
configure: error: sf is not compatible with GDAL versions below 2.0.0
然后,我从conda安装了gdal
2.3.1并确认了版本:
gdalinfo --version
GDAL 2.3.1,发布于2018/06/22
但是我仍然收到相同的错误消息。
R 3.5上的SF找不到与gdal相似的正确版本,但其解决方案涉及在conda之外安装。我在Ubuntu上。
如何sf
识别gdal
已安装的正确版本?
编辑:sessionInfo()
在R
节目中:
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.1 tools_3.5.1
从conda安装R时遇到另一个问题
编辑:通过从conda安装R时conda install -c r r
,出现此错误:
-----Error: libudunits2.a not found-----
If the udunits2 library is installed in a non-standard location,
use --configure-args='--with-udunits2-lib=/usr/local/lib' for example,
or --configure-args='--with-udunits2-include=/usr/include/udunits2'
replacing paths with appropriate values for your installation.
You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIB
environment variables.
If udunits2 is not installed, please install it.
It is required for this package.
这仍然是在安装后的情况udunits
,并udunits2
从畅达:
conda install -c conda-forge udunits
conda install -c conda-forge udunits2
错误是由非conda软件包安装引起的。在干净的环境中,sf
可以直接从conda
以下位置安装软件包:
conda create -n rsf -c conda-forge r-sf
source activate rsf
或在干净的环境中:
conda install -c conda-forge r-sf
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句