LibMagickCore.so.4: cannot open file of shared objects: there is no such file or directory

UPDATE:

gem install rmagick solved the problem.

=======================================

After updating my ubuntu to 12.10, when I run the rails application, it gives an error

libMagickCore.so.4: cannot open file of shared objects: there is no such file or directory - / home / pramod / .rvm / gems / ruby-1.9.3-p327 / gems / rmagick-2.13.2 / lib / RMagick2.so

below path exists in my system.

/home/pramod/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.2/lib/RMagick2.so

I am new to Linux and have no idea how to solve it. Any help is much appreciated.

+8
ruby-on-rails ubuntu
source share
5 answers

When updating, you may lose the link to the library file in the compiled gem. To solve this problem, just recompile the gem (in this case rmagick gem). Depending on the server setup, you can do this with gem pristine rmagick or bundle exec gem pristine rmagick when using the bundle.

+18
source share

Add the following attempt to .bashrc.

 export LD_LIBRARY_PATH=/usr/local/lib 

if the above command does not work, install ImageMagick to configure using rmagick. Try

  gem uninstall rmagick gem install rmagick 
+6
source share

This worked for me (although they also tried reinstalling the export and gem solutions, which might also have helped, but did not do the full job ...):

 ldconfig /usr/local/lib 
+2
source share

I had the same problem, the version before version 2.15.3 worked for me

+1
source share

In my case, I had all my own libraries installed under vendor / bundle , because we use bundle install --deployment on our servers.

In this setting, neither gem pristine rmagick nor gem uninstall rmagick; gem install vendor/cache/rmagick-<version>.gem gem uninstall rmagick; gem install vendor/cache/rmagick-<version>.gem did not help.

I had to remove vendor / bundle and run bundle install again --deployment rm -r vendor/bundle; bundle install --deployment rm -r vendor/bundle; bundle install --deployment .

These commands must be run from the root directory of the rails application.

0
source share

All Articles