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.

CentOS6.6から6.7にあげたらlibMagickCore.so.2が見つからなくなった

Posted at

sakuraのVPSのCentOSが6.6から6.7にあがっていたので更新

# yum update

したらばRailsのrakeが動かなくなってしもた

$ RAILS_ENV=production bundle exec rake db:migrate
rake aborted!
LoadError: libMagickCore.so.2: cannot open shared object file: No such file or directory - /usr/local/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/rmagick-2.15.4/RMagick2.so

RMagick2.soはある

$ ls -l /usr/local/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/rmagick-2.15.4/
-rwxr-xr-x 1 xxxxxx xxxxxx 521011 12月  7 19:05 2015 RMagick2.so

でもlibMagickCore.so.2はいない

$ sudo find / -name libMagickCore.so.2
$

libMagickCore.so.2がそもそも見つからない件 に書いてあった
appのgemフォルダ(bundler?)を削除して、bundle installしなおす
を参考に

$ bundle exec gem uninstall rmagick

Select gem to uninstall:
 1. rmagick-2.13.4
 2. rmagick-2.15.2
 3. rmagick-2.15.4
 4. All versions
> 4
ERROR:  While executing gem ... (NoMethodError)
    undefined method `name' for nil:NilClass

なんのErrorだ??意味わからんけど無視w

$ cd /usr/local/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems
$ rm -rf rmagick*

$ cd /var/www/xxxxxxxx
$ bundle install

....
Installing rmagick 2.15.4
....

これでrakeコマンドを実行してみたら動いた!

泣きそうだったぜ

4
2
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
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?