开发者

When trying to install RPostgreSQL, why do I get package 'DBI' does not have a name space?

I am trying the following command:

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

I get the following error message:

* 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:/P开发者_如何学CROGRA~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'

I installed DBI using

R CMD install DBI_0.1-10.tar.gz

and it appeared to work fine.

I alternatively tried

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

but get

Warning message: In getDependencies(pkgs, dependencies, available, lib) : package ‘RPostgreSQL_0.1-7’ is not available (for R version 2.13.1)


Could something be wrong or unusual with your R installation?

Also, the R development version is in the middle of requiring a NAMESPACE for every package and, if needed, building one for a package does not supply it. But this should affect only R-devel and not the current version. Which version are you running?

Anyway, and for the record, it still installs fine here (R 2.13.1, Ubuntu 11.0, some customization in ~/.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$ 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜