使用 capybara-webkit 和 QT 时如何解决 mach-o 架构错误

发布于 2024-12-05 07:43:45 字数 1026 浏览 2 评论 0原文

我在 OS X Lion 上使用 capybara-webkit。我使用brew来安装QT,它似乎与capybara-webkit gem一起安装成功。我收到以下错误,但不完全确定如何解决它们。

我在网上做了一些研究,但看起来我的架构与插件上的运行文件显示 i386 相匹配。有什么意见吗?

2011-09-19 19:58:26.289 webkit_server[9927:107] Error loading /Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin/Contents/MacOS/SharePointBrowserPlugin:  dlopen(/Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin/Contents/MacOS/SharePointBrowserPlugin, 262): no suitable image found.  Did find:
    /Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin/Contents/MacOS/SharePointBrowserPlugin: mach-o, but wrong architecture
2011-09-19 19:58:26.291 webkit_server[9927:107] Error loading /Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin:  dlopen(/Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin, 265): no suitable image found.  Did find:
    /Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin: mach-o, but wrong architecture

I am using capybara-webkit on OS X Lion. I used brew to install QT, which seems to have installed successfully along with the capybara-webkit gem. I'm getting the following errors and am not entirely sure how to resolve them.

I do some research online, but it looks like my architectures match up as running file on the plugin shows i386. Any input?

2011-09-19 19:58:26.289 webkit_server[9927:107] Error loading /Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin/Contents/MacOS/SharePointBrowserPlugin:  dlopen(/Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin/Contents/MacOS/SharePointBrowserPlugin, 262): no suitable image found.  Did find:
    /Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin/Contents/MacOS/SharePointBrowserPlugin: mach-o, but wrong architecture
2011-09-19 19:58:26.291 webkit_server[9927:107] Error loading /Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin:  dlopen(/Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin, 265): no suitable image found.  Did find:
    /Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin: mach-o, but wrong architecture

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

梦行七里 2024-12-12 07:43:45

我最近遇到了一个类似的问题,在启动 Rails 控制台或 Rails 服务器时,Rails 抛出“但错误的架构,没有找到合适的图像”错误。

在关联的 .dylib 文件和 gem 上运行 file 通常会返回适用的 x86_64 版本或包含该版本的通用版本。最终,我追溯到了我运行的实际 Ruby 版本。 /usr/bin/ruby 可执行文件本身仅兼容 i386。这确实令人震惊,因为我以为新的 xcode 和 osx 10.7 会给我带来 64 位 ruby​​。

使用 RVM,我安装了另一个 ruby​​ 实例(同样是 1.8.7)。执行此操作需要我安装一个新的 readline 实例(我使用自制程序:brew install readline)并使用 rvm install 1.8.7 --with-readline-dir 安装 rvm =/usr/local/Cellar/readline/6.2.1/。

完成此操作后,并切换到使用我的新 ruby​​ 实例(rvm use 1.8.7),我所有的 gem 都消失了(RVM 安装以某种方式更改了我的默认 gem_path。)gem install rake< /code>,然后是 gem install bundler,然后是 bundle install 让我启动并运行。

长话短说,确保您的 ruby​​ 可执行文件与您的 ruby​​/rails 包内置的指令集版本相匹配。

I recently had a similar issue where rails was throwing the "but wrong architecture no suitable image found" error when starting rails console or the rails server.

Running file on the associatd .dylib files, and the gem, generally returned either an applicable x86_64 version, or a universal which included it. Eventually, I traced it back to the actual version of Ruby I was running. The /usr/bin/ruby executable itself was only i386 compatible. This was really a shocker, as I assumed the new xcode and osx 10.7 would have brought me a 64 bit ruby.

Using RVM, I installed another instance of ruby (again 1.8.7). Doing this required that I install a new instance of readline (for which I used homebrew, : brew install readline) and installed the rvm with rvm install 1.8.7 --with-readline-dir=/usr/local/Cellar/readline/6.2.1/.

After doing this, and switching to use my new ruby instance (rvm use 1.8.7), all my gems were gone (the RVM install somehow changed my default gem_path.) gem install rake, followed by gem install bundler, and then bundle install got me up and running.

Long story short, make sure your ruby executable matches the instruction-set version that your ruby/rails packages are were built in.

書生途 2024-12-12 07:43:45

我在下一个链接中找到了解决方案

https://github.com/thoughtbot/capybara-webkit /问题/157

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