没有要加载的文件——RMagick2.so

发布于 11-30 20:31 字数 370 浏览 3 评论 0原文

我真的很难理解下面错误的含义。我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

浪菊怪哟2024-12-07 20:31:19

所以我从供应商/宝石中删除了这个宝石,因为解压它显然会错过动态库。

然后我创建了一个新文件:

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

并将其放入其中:

/usr/lib
/usr/local/lib

现在它正在工作。

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.

独享拥抱2024-12-07 20:31:19

将 OS X Lion 升级到 Mountain Lion 后遇到了同样的问题。 rmagick gem 安装得很好,imagemagick 也是如此。我必须卸载两者,然后重新安装才能修复它。

gem uninstall rmagick
brew uninstall imagemagick
brew install imagemagick
bundle install

当然,在此之前我必须安装 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.

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.

惟欲睡2024-12-07 20:31:19

我也遇到了和你一样的问题,你可以访问链接并使用这种方式安装到你的 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.

孤云独去闲2024-12-07 20:31:19

有时,此错误与将 Imagemagick 更新到与 rmagick 不兼容的版本有关。尝试恢复到 Imagemagick 的早期版本

brew switch imagemagick 6.7.7-6

注意:此命令仅在您使用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

brew switch imagemagick 6.7.7-6

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

停滞2024-12-07 20:31:19

我在将 Ubuntu 从 12.10 升级到 13.04 后遇到了这个问题。
它有助于重新安装 gem:

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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文