我是新手,刚安装上linux一个多月,对C也是一知半解。希望各位点拨一下。通过rkward的菜单“配置函数包”下载和安装sqldf,出现以下警告信息。然后library(sqldf), 出现“错误于library(sqldf) : 不存在叫'sqldf'这个名字的程辑包”。谢谢各位了!
警告: 无法在貯藏處/src/contrib中读写索引
警告: 无法在貯藏處/src/contrib中读写索引
警告: 无法在貯藏處/src/contrib中读写索引
警告: 无法在貯藏處/src/contrib中读写索引
also installing the dependencies ‘rJava’, ‘RJDBC’, ‘RH2’, ‘RMySQL’, ‘RpgSQL’, ‘RPostgreSQL’
试开URL’http://mirror.bjtu.edu.cn/cran/src/contrib/rJava_0.9-3.tar.gz'
Content type 'application/x-tgz' length 537153 bytes (524 Kb)
打开了URL
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
==
=
==
=
=
=
=
=
===
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
===
downloaded 524 Kb
试开URL’http://mirror.bjtu.edu.cn/cran/src/contrib/RJDBC_0.2-0.tar.gz'
Content type 'application/x-tgz' length 11178 bytes (10 Kb)
打开了URL
==================
==================
==============
downloaded 10 Kb
试开URL’http://mirror.bjtu.edu.cn/cran/src/contrib/RH2_0.1-2.8.tar.gz'
Content type 'application/x-tgz' length 1220753 bytes (1.2 Mb)
打开了URL
=
=
=
=
=
=
=
=
=
=
=
=
=
=
==
=
=
=
=
=
=
=====
=
===
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
downloaded 1.2 Mb
试开URL’http://mirror.bjtu.edu.cn/cran/src/contrib/RMySQL_0.9-3.tar.gz'
Content type 'application/x-tgz' length 165363 bytes (161 Kb)
打开了URL
=
=
===
==
==
==
=
==
===
=
=
===
=
=
==
=
==
=
==
=
=
=
==
=
=
=
==
=
=
=
==
=
=
=
downloaded 161 Kb
试开URL’http://mirror.bjtu.edu.cn/cran/src/contrib/RpgSQL_0.1-5.tar.gz'
Content type 'application/x-tgz' length 8354 bytes
打开了URL
========================
=========================
=
downloaded 8354 bytes
试开URL’http://mirror.bjtu.edu.cn/cran/src/contrib/RPostgreSQL_0.3-2.tar.gz'
Content type 'application/x-tgz' length 470695 bytes (459 Kb)
打开了URL
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
==
=
=
=
=
=
=
=
=
=
=
=
=
=
=
downloaded 459 Kb
试开URL’http://mirror.bjtu.edu.cn/cran/src/contrib/sqldf_0.4-6.1.tar.gz'
Content type 'application/x-tgz' length 27123 bytes (26 Kb)
打开了URL
=======
========
=======
========
====================
downloaded 26 Kb
* installing *source* package ‘rJava’ ...
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 how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
configure: checking whether gcc supports static inline...
yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver : '/usr/bin/jar'
compiler : '/usr/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags : '-I/usr/lib/jvm/java-6-openjdk/jre/../include'
java libs : '-L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64 -L/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/x86_64-linux-gnu/jni -L/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -L/usr/lib/jni -L/lib -L/usr/lib -ljvm'
checking whether JNI programs can be compiled...
configure: error: Cannot compile a simple JNI program. See config.log for details.
Make sure you have Java Development Kit installed and correctly registered in R.
If in doubt, re-run "R CMD javareconf" as root.
ERROR: configuration failed for package ‘rJava’
* removing ‘/home/tcz/R/x86_64-pc-linux-gnu-library/2.13/rJava’
* installing *source* package ‘RMySQL’ ...
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 ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for compress in -lz... yes
checking for getopt_long in -lc... yes
checking for mysql_init in -lmysqlclient... no
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking mysql.h usability... no
checking mysql.h presence... no
checking for mysql.h... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking /usr/local/include/mysql/mysql.h usability... no
checking /usr/local/include/mysql/mysql.h presence... no
checking for /usr/local/include/mysql/mysql.h... no
checking /usr/include/mysql/mysql.h usability... no
checking /usr/include/mysql/mysql.h presence... no
checking for /usr/include/mysql/mysql.h... no
checking /usr/local/mysql/include/mysql/mysql.h usability... no
checking /usr/local/mysql/include/mysql/mysql.h presence... no
checking for /usr/local/mysql/include/mysql/mysql.h... no
checking /opt/include/mysql/mysql.h usability... no
checking /opt/include/mysql/mysql.h presence... no
checking for /opt/include/mysql/mysql.h... no
checking /include/mysql/mysql.h usability... no
checking /include/mysql/mysql.h presence... no
checking for /include/mysql/mysql.h... no
Configuration error:
could not find the MySQL installation include and/or library
directories. Manually specify the location of the MySQL
libraries and the header files and re-run R CMD INSTALL.
INSTRUCTIONS:
1. Define and export the 2 shell variables PKG_CPPFLAGS and
PKG_LIBS to include the directory for header files (*.h)
and libraries, for example (using Bourne shell syntax):
export PKG_CPPFLAGS="-I<MySQL-include-dir>"
export PKG_LIBS="-L<MySQL-lib-dir> -lmysqlclient"
Re-run the R INSTALL command:
R CMD INSTALL RMySQL_<version>.tar.gz
2. Alternatively, you may pass the configure arguments
--with-mysql-dir=<base-dir> (distribution directory)
or
--with-mysql-inc=<base-inc> (where MySQL header files reside)
--with-mysql-lib=<base-lib> (where MySQL libraries reside)
in the call to R INSTALL --configure-args='...'
R CMD INSTALL --configure-args='--with-mysql-dir=DIR' RMySQL_<version>.tar.gz
ERROR: configuration failed for package ‘RMySQL’
* removing ‘/home/tcz/R/x86_64-pc-linux-gnu-library/2.13/RMySQL’
* 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 build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
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: line 3011: test: ==: unary operator expected
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -I/usr/share/R/include -I -fpic -std=gnu99 -O3 -pipe -g -c RS-DBI.c -o RS-DBI.o
gcc -I/usr/share/R/include -I -fpic -std=gnu99 -O3 -pipe -g -c RS-PQescape.c -o RS-PQescape.o
In file included from RS-PQescape.c:7:0:
RS-PostgreSQL.h:23:26: 致命错误: libpq-fe.h:没有那个文件或目录
编译中断。
make: *** [RS-PQescape.o] 错误 1
ERROR: compilation failed for package ‘RPostgreSQL’
* removing ‘/home/tcz/R/x86_64-pc-linux-gnu-library/2.13/RPostgreSQL’
* installing *source* package ‘sqldf’ ...
** R
** demo
** inst
** preparing package for lazy loading
Loading required package: proto
Error : package 'gsubfn' does not have a name space
ERROR: lazy loading failed for package ‘sqldf’
* removing ‘/home/tcz/R/x86_64-pc-linux-gnu-library/2.13/sqldf’
ERROR: dependency ‘rJava’ is not available for package ‘RJDBC’
* removing ‘/home/tcz/R/x86_64-pc-linux-gnu-library/2.13/RJDBC’
ERROR: dependency ‘RJDBC’ is not available for package ‘RH2’
* removing ‘/home/tcz/R/x86_64-pc-linux-gnu-library/2.13/RH2’
ERROR: dependency ‘RJDBC’ is not available for package ‘RpgSQL’
* removing ‘/home/tcz/R/x86_64-pc-linux-gnu-library/2.13/RpgSQL’
下载的程序包在
‘/tmp/RtmpybZQKF/downloaded_packages’里
警告信息:
1: In install.packages(pkgs = c("sqldf"), lib = "/home/tcz/R/x86_64-pc-linux-gnu-library/2.13", :
安装程序包'rJava'时退出狀態的值不为0
2: In install.packages(pkgs = c("sqldf"), lib = "/home/tcz/R/x86_64-pc-linux-gnu-library/2.13", :
安装程序包'RMySQL'时退出狀態的值不为0
3: In install.packages(pkgs = c("sqldf"), lib = "/home/tcz/R/x86_64-pc-linux-gnu-library/2.13", :
安装程序包'RPostgreSQL'时退出狀態的值不为0
4: In install.packages(pkgs = c("sqldf"), lib = "/home/tcz/R/x86_64-pc-linux-gnu-library/2.13", :
安装程序包'sqldf'时退出狀態的值不为0
5: In install.packages(pkgs = c("sqldf"), lib = "/home/tcz/R/x86_64-pc-linux-gnu-library/2.13", :
安装程序包'RJDBC'时退出狀態的值不为0
6: In install.packages(pkgs = c("sqldf"), lib = "/home/tcz/R/x86_64-pc-linux-gnu-library/2.13", :
安装程序包'RH2'时退出狀態的值不为0
7: In install.packages(pkgs = c("sqldf"), lib = "/home/tcz/R/x86_64-pc-linux-gnu-library/2.13", :
安装程序包'RpgSQL'时退出狀態的值不为0
> q ()