简体   繁体   English

尝试在 Linux 上的 R 中安装 rgdal 包的问题

[英]Problems with trying to to install rgdal package in R on Linux

I am trying to install the R (R version 3.2.4 Revised) package 'rgdal' onto my Linux, Ubuntu 14.04, but the package is having difficulties when it tries to load dependencies, specifically sqlite.我正在尝试将 R(R 版本 3.2.4 修订版)软件包“rgdal”安装到我的 Linux Ubuntu 14.04 上,但是该软件包在尝试加载依赖项(特别是 sqlite)时遇到了困难。

The error is as follows:错误如下:

checking for gdal.h... yes
checking gdal: linking with --libs only... no
checking gdal: linking with --libs and --dep-libs... no
/usr/lib/libgdal.so: undefined reference to `sqlite3_column_table_name'
collect2: error: ld returned 1 exit status

I updated GDAL/OGR per the instructions here , because I thought that may be the issue.我根据此处的说明更新了 GDAL/OGR,因为我认为这可能是问题所在。 Now when I type gdalinfo or ogrinfo into the terminal a similar error appears:现在,当我在终端中输入 gdalinfo 或 ogrinfo 时,会出现类似的错误:

gdalinfo: symbol lookup error: /usr/lib/libgdal.so.1: undefined 
symbol: sqlite3_column_table_name

When I look in my usr/local/lib the following sqlite libraries are present:当我查看我的 usr/local/lib 时,存在以下 sqlite 库:

libsqlite3.a libsqlite3.la libsqlite3.so libsqlite3.so.0   
libsqlite3.so.0.8.6

The funny thing is that this package was working fine in R last week and now is broken...有趣的是,这个包上周在 R 中运行良好,现在坏了......

Any help appreciated!任何帮助表示赞赏! Thanks.谢谢。

-Caitlin -凯特琳

Stumbled across this error when I was trying to upgrade GDAL.当我尝试升级 GDAL 时偶然发现了这个错误。 The fix was to ENABLE_COLUMN_METADATA when I was configuring sqlite for install with当我配置 sqlite 进行安装时,修复是ENABLE_COLUMN_METADATA

sudo CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" ./configure

See the sqlite Compile-time options for more details有关更多详细信息,请参阅sqlite 编译时选项

Sounds like a problem with that shared library, have install/update anything in your system without using your Package Manager?听起来像是该共享库的问题,是否在不使用包管理器的情况下安装/更新系统中的任何内容? (I believe its apt?) (我相信它合适吗?)

The libgdal.so.1 in your system was compiled against some version of the libsqlite libraries, which now after you updated something else, have changed but libgdal is still the same file.您系统中的 libgdal.so.1 是针对某些版本的 libsqlite 库编译的,现在在您更新其他内容后,该库已更改但 libgdal 仍然是同一个文件。

I have never used Ubuntu, but in the Linux i use (arch) this is the reason partial updates are discouraged (like updating only one program, for example)我从未使用过 Ubuntu,但在 Linux 中我使用 (arch) 这就是不鼓励部分更新的原因(例如只更新一个程序)

So I would recommend to try a full system update, or at least update the sqllite libraries.所以我建议尝试完整的系统更新,或者至少更新 sqllite 库。

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

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