Centos で mysql 5.7 をインストールした時エラーが出る時 Error: Package: mysql-community-server Requires: libsasl2.so.2()(64bit)
インストール手順:
1. 公式レポジトリを追加:
※自分のOSと希望のバージョンに合わせてください
MySQL :: A Quick Guide to Using the MySQL Yum Repository
$ sudo rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
2. mysqlをインストール
$ sudo yum install --enablerepo=mysql57-community mysql-community-server
しかーし
エラー発生:
.... Error: Package: mysql-community-server-5.7.25-1.el6.x86_64 (mysql57-community) Requires: libsasl2.so.2()(64bit) ....
わけわからん
解決方法:
1)/etc/yum.repos.dディレクトリ下のmysql-community.repoを編集,enabledを0に変える。
$ sudo vi /etc/yum.repos.d/mysql-community.repo
[mysql57-community] name=MySQL 5.7 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/ enabled=0 <---- ここ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
3. もっかいインストール
$ sudo yum install --enablerepo=mysql57-community mysql-community-server
無事エラーを回避してインストールできました
おわり