不能再加载rgdal [英] Can No Longer Load rgdal

查看:80
本文介绍了不能再加载rgdal的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu上将GDAL更新为2.2.2,现在R中的rgdal失败.当我尝试加载rgdal时收到此消息(我也尝试更新rgdal,但是没有用)

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?

推荐答案

我能够通过删除损坏的rgdal安装并重新安装来解决此问题.

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

警告消息应指出文件夹的位置(在您的情况下为/home/R/x86_64-pc-linux-gnu-library/3.3/rgdal)

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

其中path/to/rgdal将特定于您的系统和版本.然后使用install.packages('rgdal')

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

这篇关于不能再加载rgdal的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆