gpt4 book ai didi

ruby - 如何在 10.10 Yosemite 上安装 therubyracer gem?

转载 作者:数据小太阳 更新时间:2023-10-29 06:18:20 25 4
gpt4 key购买 nike

我无法在 Yosemite 10.10 上安装 therubyracer gem。

这是日志:

11:53  $ gem install libv8 -v '3.16.14.3' -- --with-system-v8Building native extensions with: '--with-system-v8'This could take a while...Successfully installed libv8-3.16.14.3Parsing documentation for libv8-3.16.14.3Installing ri documentation for libv8-3.16.14.3Done installing documentation for libv8 after 0 seconds1 gem installed02:05  $ gem install therubyracer -v '0.12.1' -- --with-system-v8Building native extensions with: '--with-system-v8'This could take a while...ERROR:  Error installing therubyracer:    ERROR: Failed to build gem native extension.    /usr/local/var/rbenv/versions/2.1.2/bin/ruby extconf.rb --with-system-v8checking for main() in -lpthread... yeschecking for main() in -lobjc... yeschecking for v8.h... no*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack of necessarylibraries and/or headers.  Check the mkmf.log file for more details.  You mayneed configuration options.Provided configuration options:    --with-opt-dir    --without-opt-dir    --with-opt-include    --without-opt-include=${opt-dir}/include    --with-opt-lib    --without-opt-lib=${opt-dir}/lib    --with-make-prog    --without-make-prog    --srcdir=.    --curdir    --ruby=/usr/local/var/rbenv/versions/2.1.2/bin/ruby    --with-pthreadlib    --without-pthreadlib    --with-objclib    --without-objclib    --enable-debug    --disable-debug    --with-v8-dir    --without-v8-dir    --with-v8-include    --without-v8-include=${v8-dir}/include    --with-v8-lib    --without-v8-lib=${v8-dir}/lib/usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.3/ext/libv8/location.rb:50:in `configure': You have chosen to use the version of V8 found on your system (Libv8::Location::System::NotFoundError)and *not* the one that is bundle with the libv8 rubygem. However,it could not be located. please make sure you have a version ofv8 that is compatible with 3.16.14.3 installed. You mayneed to special --with-v8-dir options if it is in a non-standardlocationthanks,The Mgmt    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.3/lib/libv8.rb:7:in `configure_makefile'    from extconf.rb:32:in `'extconf failed, exit code 1Gem files will remain installed in /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/therubyracer-0.12.1 for inspection.Results logged to /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/therubyracer-0.12.1/gem_make.out

最佳答案

gem uninstall libv8
brew install v8
gem install therubyracer
gem install libv8 -v '3.16.14.3' -- --with-system-v8

这是它在 10.10 (ruby 2.1.2) 上对我有用的唯一方法

或者尝试 gem install libv8 -v 'XX.XX.XX' -- --with-system-v8 添加 gem 的版本:)

Mac OS Catalina 的更新:

brew tap homebrew/versions
brew install v8@3.15
brew link --force v8@3.15
gem install libv8 -v 'XX.XX.XX' -- --with-system-v8
gem install therubyracer

关于ruby - 如何在 10.10 Yosemite 上安装 therubyracer gem?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24081473/

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