R st_read在windows上运行良好,但在linux上失败



Am正在尝试下载以下数据。它在windows机器上运行良好,但在linux服务器上返回错误

"错误:无法打开";https://public.opendatasoft.com/explore/dataset/world-administrative-boundaries/download/?format=geojson&时区=欧洲/柏林&lang=en";;该文件似乎不存在。此外:警告消息:GDAL/OGR未使用libcurl支持进行编译,不支持远程请求。(GDAL错误6(";

library(sf)
countries <- st_read("https://public.opendatasoft.com/explore/dataset/world-administrative-boundaries/download/?format=geojson&timezone=Europe/Berlin&lang=en") 

解决方法是:

download.file("https://public.opendatasoft.com/explore/dataset/world-administrative-boundaries/download/?format=geojson&timezone=Europe/Berlin&lang=en", 
destfile = "world_map.geojson")
countries <- st_read("world_map.geojson")

但如果能知道为什么在windows和linux上会有所不同,那就太好了。

相关内容

最新更新