mysql.h is missing … (Ruby on Rails, OSX)

前端 未结 5 477
情深已故
情深已故 2020-12-24 15:07

I tried several ideas ... none of them worked ... I\'m just trying to install mysql2 as a gem. My mysql is working, but every time my system says, that mysql.h is missing .

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-24 15:31

    You need to install the development headers for mysql, using brew you might need to install a lower version than 8 since some header files are removed from this distribution. For instance the my_global.h is removed, so if you code uses this header you will be forced to install a previous version then 8.

    Header File Dependencies

    We have started cleaning up header files dependencies, i.e. work on “include what you use” and on reorganizing header files to remove build dependencies. We have fixed ambiguous include paths; almost all should now be from the root. Incrementality has increased a lot after e.g. my_global.h went away, and sql_class.h was also reduced a fair bit in weight. Shipped client headers are self-contained and much more sane. For example, client headers are now platform independent (no difference between 32- and 64-bit Linux).

    brew install mysql@5.7 mysql-client@5.7
    

提交回复
热议问题