我正在尝试安装“RPostgreSQL”软件包(使用R 2.13.1,Mac OS X Snow Leopard)。
当我运行install.packages("RPostgreSQL")
时,我收到此错误:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘RPostgreSQL’ is not available (for R version 2.13.1)
所以我尝试从源代码下载并运行r CMD INSTALL RPostgreSQL_0.1-7.tar.gz
,它似乎安装得很好,但是当我调用library(RPostgreSQL)
时,我收到此错误:
`Error: package 'RPostgreSQL' is not installed for 'arch=i386'`
所以我随机尝试重新运行r CMD INSTALL RPostgreSQL_0.1-7.tar.gz
,这似乎再次正常安装,但是当我拨打library(RPostgreSQL)
时,我收到的错误略有不同:
'RPostgreSQL' is not a valid installed package
知道什么是错的吗?是不是最新版本的R不支持包,所以我应该降级我的R版本(我想,通过卸载我当前的版本并找到一个较旧版本?)如果我想使用它?
答案 0 :(得分:3)
该软件包未在CRAN上构建。请参阅CRAN page for details,表示MacOS X二进制文件不可用。包无法安装。这是安装日志:
* installing *source* package 'RPostgreSQL' ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for pg_config... no
configure: checking for PostgreSQL header files
configure: Checking include /usr/include.
configure: Checking include /usr/include/pgsql.
configure: Checking include /usr/include/postgresql.
configure: Checking include /usr/local/include.
configure: Checking include /usr/local/include/pgsql.
configure: Checking include /usr/local/include/postgresql.
configure: Checking include /usr/local/pgsql/include.
configure: Checking include /usr/local/postgresql/include.
configure: Checking include /opt/include.
configure: Checking include /opt/include/pgsql.
configure: Checking include /opt/include/postgresql.
configure: Checking include /opt/local/include.
configure: Checking include /opt/local/include/postgresql.
configure: Checking include /opt/local/include/postgresql84.
configure: Checking include /sw/opt/postgresql-8.4/include.
configure: Checking include /Library/PostgresPlus/8.4SS/include.
configure: Checking include /sw/include/postgresql.
configure: Checking lib /usr/lib.
configure: Checking lib /usr/lib/pgsql.
configure: Checking lib /usr/lib/postgresql.
configure: Checking lib /usr/local/lib.
configure: Checking lib /usr/local/lib/pgsql.
configure: Checking lib /usr/local/lib/postgresql.
configure: Checking lib /usr/local/pgsql/lib.
configure: Checking lib /usr/local/postgresql/lib.
configure: Checking lib /opt/lib.
configure: Checking lib /opt/lib/pgsql.
configure: Checking lib /opt/lib/postgresql.
configure: Checking lib /opt/local/lib.
configure: Checking lib /opt/local/lib/postgresql.
configure: Checking lib /opt/local/lib/postgresql84.
configure: Checking lib /sw/opt/postgresql-8.4/lib.
configure: Checking lib /Library/PostgresPlus/8.4SS/lib.
configure: Checking lib /sw/lib.
checking for "/libpq-fe.h"... no
configure: error: File libpq-fe.h not in ; installation may be broken.
ERROR: configuration failed for package 'RPostgreSQL'
* removing '/Volumes/Tiger/Builds/Rdev-web/QA/Simon/packages/leopard-universal/results/2.13/RPostgreSQL.Rcheck/RPostgreSQL'
您应该联系软件包维护者以获取更多信息。
答案 1 :(得分:3)
RPostgreSQL repo on Google Code有installing RPostgreSQL on Mac OS X的明确文档,我建议你从那里开始。
Neil也会尝试保持这些最新状态,所以无论出于何种原因,如果这对你失败,你总是可以来Google Groups mailing list。