在尝试安装RPostgreSQL时,为什么我得到包“DBI”没有名称空间?

时间:2011-07-21 07:08:55

标签: r

我正在尝试以下命令:

r CMD INSTALL RPostgreSQL_0.1-7.tar.gz

我收到以下错误消息:

* installing to library 'C:/.../R/win-library/2.13'
* installing *source* package 'RPostgreSQL' ...
** libs
Warning: this package has a non-empty 'configure.win' file,
so building only the main architecture

cygwin warning:
  MS-DOS style path detected: C:/PROGRA~1/R/R-213~1.1/etc/x64/Makeconf
  Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-213~1.1/etc/x64/Makeconf
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
x86_64-w64-mingw32-gcc -I"C:/PROGRA~1/R/R-213~1.1/include" -I"C:\Program Files\PostgreSQL\9.1"/include         -O2 -Wall  -std=gnu99 -c RS-DBI.c -o RS-DBI.o
x86_64-w64-mingw32-gcc -I"C:/PROGRA~1/R/R-213~1.1/include" -I"C:\Program Files\PostgreSQL\9.1"/include         -O2 -Wall  -std=gnu99 -c RS-PQescape.c -o RS-PQescape.o
x86_64-w64-mingw32-gcc -I"C:/PROGRA~1/R/R-213~1.1/include" -I"C:\Program Files\PostgreSQL\9.1"/include         -O2 -Wall  -std=gnu99 -c RS-PostgreSQL.c -o RS-PostgreSQL.o
x86_64-w64-mingw32-gcc -I"C:/PROGRA~1/R/R-213~1.1/include" -I"C:\Program Files\PostgreSQL\9.1"/include         -O2 -Wall  -std=gnu99 -c RS-pgsql-copy.c -o RS-pgsql-copy.o
x86_64-w64-mingw32-gcc -shared -s -static-libgcc -o RPostgreSQL.dll tmp.def RS-DBI.o RS-PQescape.o RS-PostgreSQL.o RS-pgsql-copy.o -LC:\Program Files\PostgreSQL\9.1/lib -llibpq -LC:/PROGRA~1/R/R-3~1.1/bin/x64 -lR
installing to C:/.../R/win-library/2.13/RPostgreSQL/libs/x64

** R
** inst
** preparing package for lazy loading
Error : package 'DBI' does not have a name space
ERROR: lazy loading failed for package 'RPostgreSQL'

我使用

安装了DBI
R CMD install DBI_0.1-10.tar.gz

它似乎工作正常。

我选择尝试

  

install.packages( 'RPostgreSQL_0.1-7')

但是

警告讯息: 在getDependencies(pkgs,dependencies,available,lib)中:   包'RPostgreSQL_0.1-7'不可用(对于R版本2.13.1)

1 个答案:

答案 0 :(得分:0)

R安装可能有问题或不正常吗?

此外,R开发版本正在为每个软件包要求一个NAMESPACE,如果需要,为一个软件包构建一个不提供它。但这应该只影响R-devel而不是当前版本。你正在运行哪个版本?

无论如何,为了记录,它仍然安装在这里(R 2.13.1,Ubuntu 11.0,〜/ .R / Makevars中的一些自定义)

edd@max:~/svn/rpostgresql$ R CMD INSTALL RPostgreSQL_0.1-7.tar.gz 
* installing to library ‘/usr/local/lib/R/site-library’
* 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... /usr/bin/pg_config
checking for "/usr/include/postgresql/libpq-fe.h"... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
ccache gcc-4.5 -I/usr/share/R/include -I/usr/include/postgresql     \
   -fpic  -O3 -g0 -Wall -pipe -pedantic -std=gnu99 -c RS-DBI.c      \
   -o RS-DBI.o
ccache gcc-4.5 -I/usr/share/R/include -I/usr/include/postgresql     \
   -fpic  -O3 -g0 -Wall -pipe -pedantic -std=gnu99 -c RS-PQescape.c \
   -o RS-PQescape.o
ccache gcc-4.5 -I/usr/share/R/include -I/usr/include/postgresql     \
   -fpic  -O3 -g0 -Wall -pipe -pedantic -std=gnu99 -c RS-PostgreSQL.c \
   -o RS-PostgreSQL.o
ccache gcc-4.5 -I/usr/share/R/include -I/usr/include/postgresql     \
   -fpic  -O3 -g0 -Wall -pipe -pedantic -std=gnu99 -c RS-pgsql-copy.c \
   -o RS-pgsql-copy.o
gcc -shared -o RPostgreSQL.so RS-DBI.o RS-PQescape.o RS-PostgreSQL.o \
   RS-pgsql-copy.o -L/usr/lib -lpq -L/usr/lib64/R/lib -lR
installing to /usr/local/lib/R/site-library/RPostgreSQL/libs
** R
** inst
** preparing package for lazy loading
Creating a new generic function for "format" in "RPostgreSQL"
Creating a new generic function for "print" in "RPostgreSQL"
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded

* DONE (RPostgreSQL)
edd@max:~/svn/rpostgresql$