码迷,mamicode.com
首页 > 编程语言 > 详细

R语言使用遇到的问题

时间:2014-10-14 14:53:58      阅读:313      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   使用   ar   for   sp   数据   

(1) R语言需要是用ODBC连接mysql数据库。需要编译RODBC

报错如下:

configure:1747: $? = 2
configure:1770: checking for C compiler default output file name
configure:1774: $CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5 checking for C compiler default output file name
configure:1775: /usr/bin/make64 MAC=64 -s -f /usr/local/lib64/R/etc/Makeconf -f /usr/local/lib64/R/share/make/config.mk print R_HOME=/usr/local/lib64/R VAR=CC
gcc -std=gnu99 === /usr/bin/make64 MAC=64 -s -f /usr/local/lib64/R/etc/Makeconf -f /usr/local/lib64/R/share/make/config.mk print R_HOME=/usr/local/lib64/R VAR=CFLAGS
-g -O2
configure:1776: /usr/bin/make64 MAC=64 -s -f /usr/local/lib64/R/etc/Makeconf -f /usr/local/lib64/R/share/make/config.mk print R_HOME=/usr/local/lib64/R VAR=CC
gcc -std=gnu99 /usr/bin/make64 MAC=64 -s -f /usr/local/lib64/R/etc/Makeconf -f /usr/local/lib64/R/share/make/config.mk print R_HOME=/usr/local/lib64/R VAR=CFLAGS
-g -O2 /usr/bin/make64 MAC=64 -s -f /usr/local/lib64/R/etc/Makeconf -f /usr/local/lib64/R/share/make/config.mk print R_HOME=/usr/local/lib64/R VAR=CPPFLAGS
-I/usr/local/include -I.  conftest.c  >&5
/usr/bin/make64: invalid option -- =
/usr/bin/make64: invalid option -- g
/usr/bin/make64: invalid option -- u
/usr/bin/make64: invalid option -- 9
/usr/bin/make64: invalid option -- 9
/usr/bin/make64: invalid option -- g
/usr/bin/make64: invalid option -- O
/usr/bin/make64: invalid option -- 2
Usage: make64 [options] [target] ...

经查原因解决方法如下:

CC=eval `"${R_HOME}/bin/R" CMD config CC`
CPP=eval `"${R_HOME}/bin/R" CMD config CPP`
CFLAGS=eval `"${R_HOME}/bin/R" CMD config CFLAGS`
CPPFLAGS=eval `"${R_HOME}/bin/R" CMD config CPPFLAGS`

 需要用到的调试命令如下:

export R_SHARE_DIR=/usr/local/lib64/R/share

 

R语言使用遇到的问题

标签:style   blog   color   io   使用   ar   for   sp   数据   

原文地址:http://www.cnblogs.com/cfox/p/4024122.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!