ubuntu mysql 出错_安装RMySQL时出错(Ubuntu 14.04中的MySQL 5.5.37)

在尝试安装RMySQL包时遇到了错误,问题在于编译过程中找不到MysqL.h头文件。尝试通过修改环境变量来解决,但未成功。最终通过运行`sudo apt-get install r-cran-rMysqL`命令成功解决了问题,使得安装顺利完成。
摘要由CSDN通过智能技术生成

每次我尝试安装R

MySQL我得到以下错误:

Installing package into ‘/home/ehsan/R/x86_64-pc-linux-gnu-library/3.0’

(as ‘lib’ is unspecified)

* installing *source* package ‘RMysqL’ ...

** package ‘RMysqL’ successfully unpacked and MD5 sums checked

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... yes

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

configure: creating ./config.status

config.status: creating src/Makevars

** libs

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/include/MysqL/MysqL.h -fpic -O3 -pipe -g -c RS-DBI.c -o RS-DBI.o

cc1: warning: /usr/include/MysqL/MysqL.h: not a directory [enabled by default]

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/include/MysqL/MysqL.h -fpic -O3 -pipe -g -c RS-MysqL.c -o RS-MysqL.o

cc1: warning: /usr/include/MysqL/MysqL.h: not a directory [enabled by default]

In file included from RS-MysqL.c:22:0:

RS-MysqL.h:32:19: fatal error: MysqL.h: No such file or directory

#include

^

compilation terminated.

make: *** [RS-MysqL.o] Error 1

ERROR: compilation Failed for package ‘RMysqL’

* removing ‘/home/ehsan/R/x86_64-pc-linux-gnu-library/3.0/RMysqL’

The downloaded source packages are in

‘/tmp/RtmpTRRPqg/downloaded_packages’

Warning message:

In install.packages("RMysqL") :

installation of package ‘RMysqL’ had non-zero exit status**

看来,它找不到MysqL.h,我搜索并更改了路径

export PKG_CPPFLAGS=”-I/usr/R/include/MysqL/MysqL.h”

但却没有成功.有很多人遇到同样的问题,但没有解决方案(如果存在)对我有用.我会感谢任何意见或帮助.

更新:已解决问题

以下命令似乎解决了这个问题:

sudo apt-get install r-cran-rMysqL

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值