在Linux上安装R软件包时出错 [英] Error installing R package for Linux

查看:345
本文介绍了在Linux上安装R软件包时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在R 3.3上安装名为"rgeos"的软件包,但是当我键入

Im trying to install a package named "rgeos" on R 3.3, but when I type

install.packages("rgeos")

但是它返回了以下错误(与其他软件包相同,但并非所有软件包都如此):

But it returns me the following error (same happens with other packages, but not all the packages):

> * installing *source* package ‘rgeos’ ...
** package ‘rgeos’ successfully unpacked and MD5 sums checked
configure: CC: gcc
configure: CXX: g++
configure: rgeos: 0.3-19
checking for /usr/bin/svnversion... no
configure: svn revision: 524
checking for geos-config... no
no
configure: error: geos-config not found or not executable.
ERROR: configuration failed for package ‘rgeos’
* removing ‘/home/kdg/R/x86_64-pc-linux-gnu-library/3.3/rgeos’
> 
> The downloaded source packages are in
>   ‘/tmp/Rtmpsa5pDo/downloaded_packages’ Warning message: In
> install.packages("rgeos") :   installation of package ‘rgeos’ had
> non-zero exit status

有任何线索如何安装此软件包?

Any clues how con install this package?

推荐答案

似乎在Linux上运行R时,必须安装一些构建工具.在这种情况下,在终端中:

It seems that when running R in Linux is necessary to install some build tools. As in this case, in the terminal:

sudo apt-get install libgeos-dev

然后尝试重新安装软件包.

Then try package install again.

提示从这里

这篇关于在Linux上安装R软件包时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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