我试图在 R 3.3 上安装一个名为“rgeos”的包,但是当我输入
install.packages("rgeos")
但它返回给我以下错误(其他包也会发生同样的情况,但不是所有包):
> * 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
有什么线索如何安装这个软件包吗?
看来在Linux下运行R时是需要安装一些构建工具的。在本例中,在终端中:
sudo apt-get install libgeos-dev
然后再次尝试包安装。
来自这里的提示 https://askubuntu.com/questions/312294/once-installed-geos-library-c-and-c-and-then-trying-to-install-rgeos-packa
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)