r - 从 conda 安装 gdal 2.3 后,sf R 包“与 2.0.0 以下的 GDAL 版本不兼容”
问题描述
在尝试安装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 年 6 月 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 从 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安装后仍然是这种情况:
conda install -c conda-forge udunits
conda install -c conda-forge udunits2
解决方案
以下对我有用,尽管我在 Centos 6 而不是 Ubuntu 16.04 上运行它。
conda create -n rsf r-udunits2 geos gdal proj4
source activate rsf
R
.
install.packages("sf")
library("sf")
推荐阅读
- python-3.x - Gtk 问题:ModuleNotFoundError: No module named 'gtk'
- c# - 如何正确解析 HL7 消息字符串?
- python - 不和谐.py | 图片未发送
- asp.net-core - 防伪令牌:如何更改过期时间
- docker - Minikube / Grafana:连接被拒绝
- linux - QT Creator CMake 配置问题:忽略添加参数
- reactjs - 如何更改material-ui选择值?
- jestjs - 使用 vue-test 和 Jest 测试 b-form-radio
- java - Java Mission Control (JMC) 无法更改 MBean 属性
- google-apps-script - 停止脚本创建 PDF 副本