Can No Longer Load rgdal

*爱你&永不变心* 提交于 2019-12-11 04:57:58

问题


I updated my GDAL to 2.2.2 on Ubuntu and now rgdal fails in R. I get this message when I try to load rgdal (I also tried to update rgdal, but didn't work).

Error in get(method, envir = home) : 
  lazy-load database '/home/R/x86_64-pc-linux-gnu-library/3.3/rgdal/R/rgdal.rdb' is corrupt
In addition: Warning messages:
1: In .registerS3method(fin[i, 1], fin[i, 2], fin[i, 3], fin[i, 4],  :
  restarting interrupted promise evaluation
2: In get(method, envir = home) :
  restarting interrupted promise evaluation
3: In get(method, envir = home) : internal error -3 in R_decompress1
Error: package or namespace load failed for ‘rgdal’

Any ideas of how to fix this?


回答1:


I resolve it by updating and upgrading my system :

sudo apt update & sudo apt upgrade



回答2:


I was able to resolve this issue by deleting my corrupt rgdal installation, and simply reinstalling.

The warning message should indicate where it the folder is located (in your case /home/R/x86_64-pc-linux-gnu-library/3.3/rgdal)

In your terminal, you can delete the installed version with

rm -rf path/to/rgdal

where path/to/rgdal will be specific to your system and version. Then reinstall in R with install.packages('rgdal')



来源:https://stackoverflow.com/questions/49821217/can-no-longer-load-rgdal

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!