gpt4 book ai didi

R 包 rgdal/rgeos "is not available (for R version 3.1.1)"

转载 作者:行者123 更新时间:2023-12-04 11:49:50 35 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?

(18 个回答)


6年前关闭。




在 OSX Mavericks 上的新 R 版本中安装某些软件包时遇到困难。两者 rgeosrgdal返回例如:

package 'rgeos' is available as a source package but not as a binary

Warning in install.packages :
package 'rgeos' is not available (for R version 3.1.1)

在我的 Windows 系统上,R 3.1.1 的两个软件包都安装得很好,所以这是 Mavericks/OSX 版本问题还是我的构建有问题?更改库存储库没有任何区别。我看过从二进制文件构建,但例如在 rgeos homepage它指出“OS X Mavericks 二进制文件:r-release:不可用”,所以我被骗了。

多谢指教。

编辑:

尝试@Andrie 的建议:
> install.packages('rgeos', type='source')
Installing package into ‘/Users/robinedwards/Library/R/3.1/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.ma.imperial.ac.uk/src/contrib/rgeos_0.3-6.tar.gz'
Content type 'application/x-gzip' length 240510 bytes (234 Kb)
opened URL
==================================================
downloaded 234 Kb

* installing *source* package ‘rgeos’ ...
** package ‘rgeos’ successfully unpacked and MD5 sums checked
configure: CC: clang
configure: CXX: clang++
configure: rgeos: 0.3-4
checking for /usr/bin/svnversion... yes
configure: svn revision: 450
checking geos-config usability...
./configure: line 2056: geos-config: command not found
no
configure: error: geos-config not usable
ERROR: configuration failed for package ‘rgeos’
* removing ‘/Users/robinedwards/Library/R/3.1/library/rgeos’
Warning in install.packages :
installation of package ‘rgeos’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/_s/ppznw4sx7p51kwv__hj3d8540000gn/T/RtmpK40xj7/downloaded_packages’

以及构建页面的屏幕截图:

enter image description here

最佳答案

您需要安装 rgdalrgeos从源头。

  • 首先安装包rgeos
  • 然后安装 rgdal从源头。

  • 尝试这个:
    install.packages('rgeos', type="source")
    install.packages('rgdal', type="source")

    关于R 包 rgdal/rgeos "is not available (for R version 3.1.1)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25324721/

    35 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com