gpt4 book ai didi

mysql - 无法在 Centos 6.7 上安装 R 包 RMySQL

转载 作者:太空宇宙 更新时间:2023-11-04 10:39:35 24 4
gpt4 key购买 nike

我无法在我的 Centos 6.7 服务器上安装 RMySQL 包。我已经完成研究,这似乎是一个已知问题,但我还没有找到适用于我的机器的解决方案。我发现安装此软件包的初始链接就在这里 link .但是,每当我尝试安装 RMySQL 包时,我都会收到以下错误,如果我从 CRAN 或源代码下载该包,我也会收到同样的错误。

错误:

* 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 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1
Using PKG_LIBS=-L/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libmysqlclient was not found. Try installing:
* deb: libmysqlclient-dev | libmariadb-client-lgpl-dev (Debian)
libmysqlclient-dev | libmariadbclient-dev (Ubuntu)
* rpm: mariadb-devel | mysql-devel (Fedora, CentOS, RHEL)
* csw: mysql56_dev (Solaris)
* brew: mysql-connector-c (OSX)
If libmysqlclient is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libmysqlclient.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 ‘RMySQL’
* removing ‘/usr/lib64/R/library/RMySQL’

The downloaded source packages are in
‘/tmp/RtmpbWSzgQ/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("RMySQL") :
installation of package ‘RMySQL’ had non-zero exit status

在这一点上我没有想法,我相信我可能必须使用 rpm 来安装 mariadb-devel | mysql-devel.. 但我找不到源代码,也从未使用过此 rpm 构建功能。

我读到 libmysqlclient 不在 CentOS 中,这就是问题所在,如果那是真的,我该如何解决这个问题。如果其他人能够在他们的 CentOS 服务器上安装 RMySQL,我将不胜感激。谢谢

最佳答案

第 1 步:在命令提示符下 sudo yum install mysql-devel

第 2 步:install.packages("https://cloud.r-project.org/src/contrib/RMySQL_0.10.9.tar.gz")

关于mysql - 无法在 Centos 6.7 上安装 R 包 RMySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35730591/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com