2
1

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.

【redmine】mysqlのバージョンを上げて「libmysqlclient.so.18: cannot open shared object file」が出てしまった場合の対処

Posted at

mysqlのバージョンを5.7に上げて5.6には戻してはいけない状況、、、
redmineはlibmysqlclient.so.18: cannot open shared object fileなんて言ってくる

どうしたものか?

# find / -name "libmysqlclient*"

無いようですね。

/usr/lib64/mysql/libmysqlclient.so.20
/usr/lib64/mysql/libmysqlclient.so.20.3.9
/usr/lib64/mysql/libmysqlclient.a
/usr/lib64/mysql/libmysqlclient.so

コマンド ln でごまかしても、いやいやlibmysqlclient.so.18じゃないです!と怒られる。

gem uninstall mysql2
gem install mysql2

消して入れ直しても動かない、、、

mysqlのバージョンは上げたまま対応

redmineのディレクトリまで移動

# cd /var/lib/redmine/

gem mysql2 をuninstall

# gem uninstall mysql2

Gemfile 書き換える

vi Gemfile
when 'mysql2'
# gem "mysql2", "~> 0.3.17", :platforms => [:mri, :mingw, :x64_mingw]
  gem "mysql2", "~> 0.3.21", :platforms => [:mri, :mingw, :x64_mingw]

bundle install

# bundle install
.
.
.

mysqlのバージョンを戻すか、remineのバージョンを上げてしまった方が良いかと思いますが、何とかこれで一応は動かすことができました・・・。

2
1
0

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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?