欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

linux下R安装RMySQL不成功configurationfailedforpackage‘RMySQL’

程序员文章站 2022-04-08 10:53:24
linux下R安装RMySQL不成功 configuration failed for package ‘RMySQL’ #install.packages(&...

linux下R安装RMySQL不成功 configuration failed for package ‘RMySQL’

 #install.packages('RMySQL')

报错:
将程序包安装入‘/home/app_user_5i5j/R/x86_64-pc-linux-gnu-library/3.4’
(因为‘lib’没有被指定)
试开URL’https://mirror.lzu.edu.cn/CRAN/src/contrib/RMySQL_0.10.13.tar.gz’

Content type ‘application/octet-stream’ length 54257 bytes (52 KB)

downloaded 52 KB

installing source package ‘RMySQL’ …
** 成功将‘RMySQL’程序包解包并MD5和检查
Using PKG_CFLAGS=
Using PKG_LIBS=-lmysqlclient
————————- ANTICONF ERROR —————————
Configuration failed because libmysqlclient was not found. Try installing:
deb: libmariadb-client-lgpl-dev (Debian, Ubuntu 16.04)
libmariadbclient-dev (Ubuntu 14.04) rpm: mariadb-devel | mysql-devel (Fedora, CentOS, RHEL) csw: mysql56_dev (Solaris) brew: mariadb-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 ‘/home/app_user_5i5j/R/x86_64-pc-linux-gnu-library/3.4/RMySQL’

下载的程序包在
‘/tmp/RtmpZFkXgl/downloaded_packages’里
Warning message:
In install.packages(“RMySQL”) : 安装程序包‘RMySQL’时退出狀態的值不是0

解决方式:
linux CentOS解决方式
报错上面提示:没有发现依赖包需要安装
环境下安装rpm: mariadb-devel | mysql-devel
# sudo yum install mariadb-devel
# sudo yum install mysql-devel
然后运行install.packages(‘RMySQL’)安装成功