install RMySQL for Mac

前端 未结 2 1855
野趣味
野趣味 2021-01-22 10:29

I get below error when I try to install Mysql package (MAC OS)

install.packages(\'RMySQL\')

  package ‘RMySQL’ is available as a source package but not as a bi         


        
相关标签:
2条回答
  • 2021-01-22 11:02

    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

    0 讨论(0)
  • 2021-01-22 11:02

    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') 
    
    0 讨论(0)
提交回复
热议问题