install RMySQL for Mac

我只是一个虾纸丫 提交于 2019-12-02 01:30:30
RyanLeiTaiwan

The author of RMySQL no longer provide binary packages, so you will have to build from source.

I have posted the complete solution in another thread: Installing RMySQL in mavericks.

Basically, in order for install.packages('RMySQL', type='source') to work correctly, what you are lacking are:

  1. Make sure you have "gcc" available.
  2. Install MySQL client somewhere, e.g., via Homebrew.
  3. Configure and build RMySQL from source in RStudio or in Terminal:

    • Set the 2 environment variables PKG_CPPFLAGS and PKG_LIBS to indicate where the include and lib are.

    • Run install.packages('RMySQL', type='source') in RStudio or R CMD INSTALL RMySQL_x.x-x.tar.gz in Terminal

Installing from source worked well for me. For those who are new to R, the way to install from source is:

install.packages('RMySQL', type='source') 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!