首页 > 代码库 > R语言使用遇到的问题
R语言使用遇到的问题
(1) R语言需要是用ODBC连接mysql数据库。需要编译RODBC
报错如下:
configure:1747: $? = 2configure:1770: checking for C compiler default output file nameconfigure:1774: $CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5 checking for C compiler default output file nameconfigure: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=CCgcc -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 -O2configure: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=CCgcc -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语言使用遇到的问题
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。