MySQL Install: ERROR: Failed to build gem native extension

前端 未结 14 1791
天涯浪人
天涯浪人 2020-11-28 19:23

I\'m trying to get MySQL installed to the latest version due to some installation going wrong somewhere along the line. I run the command gem install mysql and

14条回答
  •  青春惊慌失措
    2020-11-28 20:21

    First of all you need to differentiate between the MySQL as Server, MySQL as Client and the Ruby bindings to MySQL.

    I'm not familiar with Mac, but for *nix OS you need to install MySQL through your package manager. To get the Ruby bindings installed with

    gem install mysql
    

    you need the development headers of ruby (in Ubuntu it is the package ruby-dev) and the development headers of the MySQL-Client (currently libmysqlclient16-dev in Ubuntu). I don't know if they are named different on Mac, but after you got those installed the Ruby bindings should install without any error.

提交回复
热议问题