简体   繁体   English

R版本3.4.0 rgdal无法加载

[英]R version 3.4.0 rgdal will not load

I recently installed the latest version of R (3.4.0) and installed all of my packages, but for some reason rgdal will not load and I'm getting this message: 我最近安装了最新版本的R(3.4.0),并安装了所有软件包,但是由于某些原因,rgdal无法加载,并且出现以下消息:

library(rgdal) Error: package or namespace load failed for 'rgdal' in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal/libs/rgdal.so': dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal/libs/rgdal.so, 6): Library not loaded: /Builds/unix/recipes/build/gdal-2.1.3-obj/libgdal.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal/libs/rgdal.so Reason: image not found 库(rgdal)错误:dyn.load中“ rgdal”的包或名称空间加载失败(文件,DLLpath = DLLpath等):无法加载共享对象“ /Library/Frameworks/R.framework/Versions/3.4/资源/库/rgdal/libs/rgdal.so':dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal/libs/rgdal.so,6):未加载库:/ Builds / unix / recipes / build / gdal-2.1.3-obj / libgdal.dylib引用自:/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal/libs/rgdal.so原因:找不到图像

I went to the rgdal/libs directory and the rgdal.so file exists, but for some reason doesn't want to load. 我进入了rgdal / libs目录,并且存在rgdal.so文件,但是由于某些原因不想加载。 Anyone else have this issue or a similar one? 其他人有这个问题或类似的问题吗?

Try installing RStudio and re-download it from there or type install.packages("rgdal") . 尝试安装RStudio并从那里重新下载它,或键入install.packages("rgdal") If none of these work try installing another package and see if you can run it, because it is either the directory, the package or the version of the package is not compatible with the version of the language. 如果这些都不起作用,请尝试安装另一个软件包并查看是否可以运行它,因为它是目录,软件包或该软件包的版本与该语言的版本不兼容。

Do you have GDAL OS X frameworks installed? 您是否安装了GDAL OS X框架? If not, go to William Kyngesburye's site , download and install frameworks in the following order: 如果不是,请访问William Kyngesburye的站点 ,按以下顺序下载并安装框架:

  1. GDAL Complete GDAL完成
  2. GSL Framework GSL框架
  3. FreeType 的FreeType
  4. cairo 开罗

After completing this installation, go for steps 2 and 3 of this answer , and then, install rgdal from R.app using these specifications in the install.packages command. 完成此安装后,请执行此答案的步骤2和3,然后使用install.packages命令中的这些规范从R.app安装rgdal。

It solved the problem for me, hope it helps you! 它为我解决了问题,希望对您有所帮助!

Seems to be related to my issue posted same day, Unable to load pgirmess library ("image not found") - R 3.4 in Mac OS . 似乎与当天发布的问题有关, 无法加载pgirmess库(“找不到图像”)-在Mac OS中为R 3.4

I installed the previous version of R from CRAN (3.3.3), and it works fine. 我从CRAN(3.3.3)安装了R的早期版本,并且工作正常。 You can have both versions installed at the same time. 您可以同时安装两个版本。 Maybe not a long term solution but at least a temporary fix so your work can continue. 也许不是一个长期的解决方案,但至少是一个临时解决方案,以便您的工作可以继续进行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM