RMySQL在Fedora 28,Rstudio 1.1.4版上安装错误, [英] RMySQL installing error on Fedora 28, Rstudio version 1.1.4,

查看:161
本文介绍了RMySQL在Fedora 28,Rstudio 1.1.4版上安装错误,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试在Rstudio上安装RmySQL时,如果我已经安装了所有必需的依赖项,就会出现此编译器"错误.

Whenever I try to install RmySQL on Rstudio it gives me this "compiler" error tho I've installed all the requires dependencies.

> install.packages("RMySQL", dependencies=TRUE)
    Installing package into ‘/home/nizar/R/x86_64-redhat-linux-gnu-library/3.4’
    (as ‘lib’ is unspecified)
    also installing the dependency ‘curl’

    trying URL 'https://cran.rstudio.com/src/contrib/curl_3.2.tar.gz'
    Content type 'application/x-gzip' length 367047 bytes (358 KB)
    ==================================================
    downloaded 358 KB

    trying URL 'https://cran.rstudio.com/src/contrib/RMySQL_0.10.14.tar.gz'
    Content type 'application/x-gzip' length 52703 bytes (51 KB)
    ==================================================
    downloaded 51 KB

    * installing *source* package ‘curl’ ...
    ** package ‘curl’ successfully unpacked and MD5 sums checked
    Package libcurl was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libcurl.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'libcurl', required by 'virtual:world', not found
    Package libcurl was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libcurl.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'libcurl', required by 'virtual:world', not found
    Using PKG_CFLAGS=
    Using PKG_LIBS=-lcurl
    ------------------------- ANTICONF ERROR ---------------------------
    Configuration failed because libcurl was not found. Try installing:
     * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
     * rpm: libcurl-devel (Fedora, CentOS, RHEL)
     * csw: libcurl_dev (Solaris)
    If libcurl is already installed, check that 'pkg-config' is in your
    PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
    is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
    R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
    --------------------------------------------------------------------
    ERROR: configuration failed for package ‘curl’
    * removing ‘/home/nizar/R/x86_64-redhat-linux-gnu-library/3.4/curl’
    Warning in install.packages :
      installation of package ‘curl’ had non-zero exit status
    * installing *source* package ‘RMySQL’ ...
    ** package ‘RMySQL’ successfully unpacked and MD5 sums checked
    Found mysql_config cflags and libs!
    Using PKG_CFLAGS=-I/usr/include/mysql -m64 
    Using PKG_LIBS=-L/usr/lib64/mysql -lmysqlclient -lpthread -lm -lrt -lssl -lcrypto -ldl
    ** libs
    rm -f RMySQL.so RMySQL-init.o connection.o db-apply.o driver.o exception.o fields.o result.o utils.o
    gcc -m64 -I/usr/include/R -DNDEBUG -I/usr/include/mysql -m64   -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection  -c RMySQL-init.c -o RMySQL-init.o
    gcc -m64 -I/usr/include/R -DNDEBUG -I/usr/include/mysql -m64   -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection  -c connection.c -o connection.o
    connection.c: In function ‘RS_MySQL_moreResultSets’:
    connection.c:224:3: error: unknown type name ‘my_bool’; did you mean ‘bool’?
       my_bool           tmp;
       ^~~~~~~
       bool
    make: *** [/usr/lib64/R/etc/Makeconf:159: connection.o] Error 1
    ERROR: compilation failed for package ‘RMySQL’
    * removing ‘/home/nizar/R/x86_64-redhat-linux-gnu-library/3.4/RMySQL’
    Warning in install.packages :
      installation of package ‘RMySQL’ had non-zero exit status

    The downloaded source packages are in
        ‘/tmp/RtmpF8mtsU/downloaded_packages’

我尝试通过dnf命令从fedora中删除Mysql,但还是一样,尝试了"dnf install c-cran-rmysql",但没有得到结果..

推荐答案

您的答案在此行之后:

Configuration failed because libcurl was not found. Try installing:

安装libcurl-devel软件包,如果尚未安装libcurl软件包,该软件包也将安装.

Install the libcurl-devel package which will also install libcurl if it isn't already.

dnf install libcurl-devel

否则,您可以安装RMariaDB软件包,因为RMySQL基于正在逐步淘汰的代码,因此软件包是最新的.

Failing that, you can install the RMariaDB package instead which is more up to date as RMySQL is based on code which is being phased out.

这篇关于RMySQL在Fedora 28,Rstudio 1.1.4版上安装错误,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆