gpt4 book ai didi

ruby - 无法在 OS X 上安装 capybara-webkit

转载 作者:太空宇宙 更新时间:2023-11-03 17:52:40 26 4
gpt4 key购买 nike

我安装了 Qt 4.8.5,这是 capybara-webkit 所需要的,但出于某种原因,我的系统似乎认为我仍在使用 4.7.x。

我通过删除/Developer/Applications 删除了 4.7.x(位于/Developer/Applications 中),因为 Apple 的开发人员工具不再使用该位置,所以 Qt 4.7.x 是那里唯一的东西。

我在删除 Qt 4.7.x 后重新安装了 Qt 4.8.5,并尝试安装 capybara-webkit,但没有成功:

$ brew reinstall qt4
==> Reinstalling qt4
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/qt-4.8.5.mavericks.bottle.
Already downloaded: /Library/Caches/Homebrew/qt-4.8.5.mavericks.bottle.4.tar.gz
==> Pouring qt-4.8.5.mavericks.bottle.4.tar.gz
==> Caveats
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.

.app bundles were installed to /usr/local/Cellar/qt/4.8.5 (or libexec).
Run `brew linkapps` to symlink these to /Applications.
==> Summary
🍺 /usr/local/Cellar/qt/4.8.5: 2780 files, 120M
$ gem install capybara-webkit -v '1.1.1'
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.

/Users/brandon/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
cd src/ && /usr/bin/qmake /Users/brandon/.rvm/gems/ruby-2.0.0-p353/gems/capybara-webkit-1.1.1/src/webkit_server.pro -spec /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile.webkit_server
Project ERROR: At least Qt 4.8.0 is required to run capybara-webkit.
make: *** [sub-src-webkit_server-pro-qmake_all] Error 2
Command 'make qmake' failed

make "DESTDIR=" clean
cd src/ && /usr/bin/qmake /Users/brandon/.rvm/gems/ruby-2.0.0-p353/gems/capybara-webkit-1.1.1/src/webkit_server.pro -spec /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile.webkit_server
Project ERROR: At least Qt 4.8.0 is required to run capybara-webkit.
make: *** [src/Makefile.webkit_server] Error 2

make "DESTDIR="
cd src/ && /usr/bin/qmake /Users/brandon/.rvm/gems/ruby-2.0.0-p353/gems/capybara-webkit-1.1.1/src/webkit_server.pro -spec /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile.webkit_server
Project ERROR: At least Qt 4.8.0 is required to run capybara-webkit.
make: *** [src/Makefile.webkit_server] Error 2

make failed, exit code 2

Gem files will remain installed in /Users/brandon/.rvm/gems/ruby-2.0.0-p353/gems/capybara-webkit-1.1.1 for inspection.
Results logged to /Users/brandon/.rvm/gems/ruby-2.0.0-p353/extensions/x86_64-darwin-12/2.0.0-static/capybara-webkit-1.1.1/gem_make.out

如果我运行 brew linkapps,它会在/Applications 中为 *.App 文件创建符号链接(symbolic link),但它似乎没有做任何与 capybara-webkit 安装相关的事情。我不确定什么应该链接到哪里,或者这是否是问题所在,但其他 Homebrew 安装的软件似乎链接到 /usr/local/bin/。不过,其中似乎没有任何与 Qt 相关的内容:

$ ls /usr/local/bin/q*
/usr/local/bin/qcollectiongenerator /usr/local/bin/qmake
/usr/local/bin/qdoc3 /usr/local/bin/qmlplugindump
/usr/local/bin/qhelpgenerator /usr/local/bin/qt3to4

有什么问题?我该如何解决?

最佳答案

问题似乎是 PATH 中的第一个 qmake 是指向 4.7 版本的符号链接(symbolic link):

$ ls -hal `which qmake`
lrwxr-xr-x 1 507 wheel 9B Aug 8 2012 /usr/bin/qmake -> qmake-4.7

去掉那个(sudo rm/usr/bin/qmake)后,使用的qmake版本是正确的:

$ which qmake
/usr/local/bin/qmake

现在我可以成功安装capybara-webkit了:

$ gem install capybara-webkit -v '1.1.1'
Building native extensions. This could take a while...
Successfully installed capybara-webkit-1.1.1
Parsing documentation for capybara-webkit-1.1.1
Installing ri documentation for capybara-webkit-1.1.1
Done installing documentation for capybara-webkit after 1 seconds
1 gem installed

关于ruby - 无法在 OS X 上安装 capybara-webkit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21355117/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com