4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS7上のRailsでMySQLが入らない問題

Last updated at Posted at 2017-08-30

執筆日

2017/08/30

どんなエラーか

$ bundle install

すると…

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

というエラーが。
「CentOS Rails MySQL gem error」とかで検索すると、CentOSにMySQLが入ってないから出るエラーっぽいというのが分かる。

だがしかし

$ sudo yum -y remove mariadb*
$ sudo yum -y install mysql-devel

デフォルトで入っているMariaDBをアンインストールして、MySQLをインストールするぞい。

Installed:
  mariadb-devel.x86_64 1:5.5.52-1.el7

は?

そう、yumでMySQLと指定してもMariaDBがずうずうしくインストールされるのである!

MySQLのリポジトリを追加する

$ sudo yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
$ sudo yum -y install mysql-devel

やったぜ。

4
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?