开发者

no such file to load -- RMagick2.so

开发者 https://www.devze.com 2023-03-30 20:21 出处:网络
I am really struggling to understand the meaning of the error below. I develop on OS X Lion, and I have RMagick installed there, and my code works flawlessly.

I am really struggling to understand the meaning of the error below. I develop on OS X Lion, and I have RMagick installed there, and my code works flawlessly.

Yet on the 开发者_运维技巧production RedHat machine, the below:

MissingSourceFile (no such file to load -- RMagick2.so):
  rmagick (2.13.1) [v] lib/RMagick.rb:11

Yes, I installed the rmagick gem locally to both machines. And I have unpacked the gem on each machine to vendor/gems.

What is probably the funniest to me is that this error is so stupid. There's not an RMagick.so file on my Mac either, but the code works.

What is the problem here?


So I removed this gem from vendor/gems, because unpacking it evidently misses the dynamic library.

Then I created a new file:

/etc/ld.so.conf.d/local.conf

and put this in there:

/usr/lib
/usr/local/lib

And now it is working.


Just had the same problem after upgrading OS X Lion to Mountain Lion. rmagick gem was installed fine, as was imagemagick. I had to uninstall both, then reinstall to fix it.

gem uninstall rmagick
brew uninstall imagemagick
brew install imagemagick
bundle install

Of course, prior to that I had to install XCode command line tools to get git and gcc back so I could brew and make again.


I also have the problem like your, you can visit Link and use this way to install to your OS X Lion, it is work for me now.


Sometimes this error is related to updating Imagemagick to a version which is incompatible with rmagick. Try reverting to a previous version of Imagemagick

brew switch imagemagick 6.7.7-6

Note: this command will only work if you're using brew


I had this problem after upgrading Ubuntu from 12.10 to 13.04. It helped to reinstall the gem:

$ gem uninstall rmagick
$ bundle # or gem install rmagick, if you don't use bundler
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号