I can't run “bundle update” because of “mysql2” gem

后端 未结 5 1699
庸人自扰
庸人自扰 2021-02-14 14:29

I have this in the Gemfile:

gem \'mysql2\'

But when I run bundle update, I get this error message:

An error oc         


        
5条回答
  •  旧巷少年郎
    2021-02-14 14:38

    I've ended up with a near-identical error message from attempting to build on a machine without gcc-c++ installed; mkmf is failing to compile a simple c program because the compiler flat out isn't there.

    If you're on CentOS, you want sudo yum install gcc-c++. On Ubuntu, it's sudo apt-get install g++. It's a little disappointing that old versions of ruby-devel don't have a dependency on g++.

提交回复
热议问题