没有要加载的文件——RMagick2.so
我真的很难理解下面错误的含义。我在 OS X Lion 上进行开发,并在那里安装了 RMagick,并且我的代码可以完美运行。
然而,在生产 RedHat 机器上,如下所示:
MissingSourceFile (no such file to load -- RMagick2.so):
rmagick (2.13.1) [v] lib/RMagick.rb:11
是的,我在两台机器本地安装了 rmagick gem。我已将每台机器上的 gem 解压到供应商/gems。
对我来说最有趣的可能是这个错误是如此愚蠢。我的 Mac 上也没有 RMagick.so 文件,但代码可以运行。
这里有什么问题呢?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
所以我从供应商/宝石中删除了这个宝石,因为解压它显然会错过动态库。
然后我创建了一个新文件:
/etc/ld.so.conf.d/local.conf
并将其放入其中:
现在它正在工作。
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:
And now it is working.
将 OS X Lion 升级到 Mountain Lion 后遇到了同样的问题。 rmagick gem 安装得很好,imagemagick 也是如此。我必须卸载两者,然后重新安装才能修复它。
当然,在此之前我必须安装 XCode 命令行工具来恢复 git 和 gcc,以便我可以再次进行 brew 和 make。
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.
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.
我也遇到了和你一样的问题,你可以访问链接并使用这种方式安装到你的 OS X Lion,现在对我来说是工作。
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.
有时,此错误与将 Imagemagick 更新到与 rmagick 不兼容的版本有关。尝试恢复到 Imagemagick 的早期版本
注意:此命令仅在您使用brew时才有效
Sometimes this error is related to updating Imagemagick to a version which is incompatible with rmagick. Try reverting to a previous version of Imagemagick
Note: this command will only work if you're using brew
我在将 Ubuntu 从 12.10 升级到 13.04 后遇到了这个问题。
它有助于重新安装 gem:
I had this problem after upgrading Ubuntu from 12.10 to 13.04.
It helped to reinstall the gem: