I tried to use RMySQL package but i get this error doing:
我尝试使用RMySQL包,但我犯了这个错误:
install.packages('RMySQL')
Warning in install.packages :
package ‘RMySQL’ is not available (for R version 2.14.2)
What can I do to use MySQL with R?
我能用R来使用MySQL吗?
Thank you!
谢谢你!
4 个解决方案
#1
4
There is not a windows binary available for the package RMySQL
. This means you will have to install this package from source and build it yourself.
包RMySQL中没有可用的windows二进制文件。这意味着您将不得不从源代码安装这个包并自己构建它。
At the CRAN RMySql page you will notice there is no binary available, with a link to Pre-compiled binary packages for R-2.14.x for Windows
在CRAN RMySql页面中,您将注意到没有可用的二进制文件,其中有一个用于R-2.14的预编译二进制包的链接。x Windows
From this page:
从这个页面:
Packages related to many database system must be linked to the exact
version of the database system the user has installed, hence it does
not make sense to provide binaries for packages
RMySQL, ROracle, ROracleUI,
although it is possible to install such packages from sources by
install.packages('packagename', type='source')
after reading the manual 'R Installation and Administration'.
So, read the manuals, in particular R Installation and Administration, install RTools, and then use:
所以,阅读手册,特别是R安装和管理,安装RTools,然后使用:
install.packages('RMySQL', type='source')
#2
2
After installing Rtools, from the RMySQL CRAN page grab the source from the Package source:
link to ensure that you have the latest version. Then read the information in the INSTALL
file that comes with the package (or find the same info at the Installation:
link on the aforementioned CRAN page).
在安装了Rtools之后,从RMySQL CRAN页面获取来自包源的源:链接以确保您拥有最新版本。然后在安装文件中读取包含包的信息(或者在安装中找到相同的信息:链接到前面提到的CRAN页面)。
The main problem that most people have is following outdated information on the internet that pertains to older versions of RMySQL rather than using the instructions that come with the package itself.
大多数人所面临的主要问题是,在互联网上使用过时的RMySQL版本信息,而不是使用自带的指令。
#3
0
After spending 10Hours,I followed Arne's instructions and Willem's comment from here: http://www.ahschulz.de/2013/07/23/installing-rmysql-under-windows/ and it worked like magic.
在花了10个小时之后,我听从了Arne的指示,Willem的评论从这里开始:http://www.ahschulz.de/2013/07/23/installing-rmysql- windows/,它像魔法一样有效。
#4
0
I experienced some difficulty with installing RMySQL package in R, twice this year. I haven't used it, yet. To help me in getting around the known additional problems, I followed the steps I found in these two articles:
我在今年的R中两次安装RMySQL包遇到了一些困难。我还没用过。为了帮助我解决已知的额外问题,我遵循了我在这两篇文章中发现的步骤:
- Installing RMySQL under Windows
- 安装RMySQL Windows下
- Vanderbilt University RMySQL page
- 范德比尔特大学RMySQL页面
First you need to download, install and configure MySQL to work with Windows. Next, you will have to create or edit a file called Renviron.site, and add the variable MYSQL_HOME
to your default environment, and other tricky tweaks that may have worked for other people, but have not worked for me.
首先,您需要下载、安装和配置MySQL与Windows一起工作。接下来,您将不得不创建或编辑一个名为renvironment的文件。站点,并将变量MYSQL_HOME添加到您的默认环境中,以及其他可能为其他人工作的棘手的调整,但对我不起作用。
It appears that running RMySQL on Windows is not advised; there are other packages that you can use to get R to work with MySQL. I've been checking out R bloggers, R Studio Support and the R Help Mailing List, for ways to get around the problem.
似乎没有建议在Windows上运行RMySQL;还有一些其他的包可以用来让R和MySQL一起工作。我一直在检查R博主、R工作室支持和R帮助邮件列表,以寻找解决问题的方法。
Although they're useful resources, there is no guarantee that the troubleshooting steps will work for everyone. You can try following them to install RMySQL package, and if they work you should be able to use the package with R.
尽管它们是有用的资源,但并不能保证故障排除步骤对每个人都有效。您可以尝试跟随它们安装RMySQL包,如果它们工作,您应该能够使用带有R的包。
#1
4
There is not a windows binary available for the package RMySQL
. This means you will have to install this package from source and build it yourself.
包RMySQL中没有可用的windows二进制文件。这意味着您将不得不从源代码安装这个包并自己构建它。
At the CRAN RMySql page you will notice there is no binary available, with a link to Pre-compiled binary packages for R-2.14.x for Windows
在CRAN RMySql页面中,您将注意到没有可用的二进制文件,其中有一个用于R-2.14的预编译二进制包的链接。x Windows
From this page:
从这个页面:
Packages related to many database system must be linked to the exact
version of the database system the user has installed, hence it does
not make sense to provide binaries for packages
RMySQL, ROracle, ROracleUI,
although it is possible to install such packages from sources by
install.packages('packagename', type='source')
after reading the manual 'R Installation and Administration'.
So, read the manuals, in particular R Installation and Administration, install RTools, and then use:
所以,阅读手册,特别是R安装和管理,安装RTools,然后使用:
install.packages('RMySQL', type='source')
#2
2
After installing Rtools, from the RMySQL CRAN page grab the source from the Package source:
link to ensure that you have the latest version. Then read the information in the INSTALL
file that comes with the package (or find the same info at the Installation:
link on the aforementioned CRAN page).
在安装了Rtools之后,从RMySQL CRAN页面获取来自包源的源:链接以确保您拥有最新版本。然后在安装文件中读取包含包的信息(或者在安装中找到相同的信息:链接到前面提到的CRAN页面)。
The main problem that most people have is following outdated information on the internet that pertains to older versions of RMySQL rather than using the instructions that come with the package itself.
大多数人所面临的主要问题是,在互联网上使用过时的RMySQL版本信息,而不是使用自带的指令。
#3
0
After spending 10Hours,I followed Arne's instructions and Willem's comment from here: http://www.ahschulz.de/2013/07/23/installing-rmysql-under-windows/ and it worked like magic.
在花了10个小时之后,我听从了Arne的指示,Willem的评论从这里开始:http://www.ahschulz.de/2013/07/23/installing-rmysql- windows/,它像魔法一样有效。
#4
0
I experienced some difficulty with installing RMySQL package in R, twice this year. I haven't used it, yet. To help me in getting around the known additional problems, I followed the steps I found in these two articles:
我在今年的R中两次安装RMySQL包遇到了一些困难。我还没用过。为了帮助我解决已知的额外问题,我遵循了我在这两篇文章中发现的步骤:
- Installing RMySQL under Windows
- 安装RMySQL Windows下
- Vanderbilt University RMySQL page
- 范德比尔特大学RMySQL页面
First you need to download, install and configure MySQL to work with Windows. Next, you will have to create or edit a file called Renviron.site, and add the variable MYSQL_HOME
to your default environment, and other tricky tweaks that may have worked for other people, but have not worked for me.
首先,您需要下载、安装和配置MySQL与Windows一起工作。接下来,您将不得不创建或编辑一个名为renvironment的文件。站点,并将变量MYSQL_HOME添加到您的默认环境中,以及其他可能为其他人工作的棘手的调整,但对我不起作用。
It appears that running RMySQL on Windows is not advised; there are other packages that you can use to get R to work with MySQL. I've been checking out R bloggers, R Studio Support and the R Help Mailing List, for ways to get around the problem.
似乎没有建议在Windows上运行RMySQL;还有一些其他的包可以用来让R和MySQL一起工作。我一直在检查R博主、R工作室支持和R帮助邮件列表,以寻找解决问题的方法。
Although they're useful resources, there is no guarantee that the troubleshooting steps will work for everyone. You can try following them to install RMySQL package, and if they work you should be able to use the package with R.
尽管它们是有用的资源,但并不能保证故障排除步骤对每个人都有效。您可以尝试跟随它们安装RMySQL包,如果它们工作,您应该能够使用带有R的包。