如何在 10.10 Yosemite 上安装 therubyracer gem?

2024-01-01

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

这是日志:



11:53  $ gem install libv8 -v '3.16.14.3' -- --with-system-v8


Building native extensions with: '--with-system-v8'
This could take a while...
Successfully installed libv8-3.16.14.3
Parsing documentation for libv8-3.16.14.3
Installing ri documentation for libv8-3.16.14.3
Done installing documentation for libv8 after 0 seconds
1 gem installed


02:05  $ gem install therubyracer -v '0.12.1' -- --with-system-v8


Building 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-v8
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need 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 of
v8 that is compatible with 3.16.14.3 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location

thanks,
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 1

Gem 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) 上对我有用的唯一方法

Or try gem install libv8 -v 'XX.XX.XX' -- --with-system-v8添加 gem 的版本:)

Mac 操作系统 Catalina 的更新:

brew tap homebrew/versions
brew install [email protected] /cdn-cgi/l/email-protection
brew link --force [email protected] /cdn-cgi/l/email-protection
gem install libv8 -v 'XX.XX.XX' -- --with-system-v8
gem install therubyracer
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在 10.10 Yosemite 上安装 therubyracer gem? 的相关文章

  • Heroku 推送错误:rake 资源上的“NameError:未初始化常量 Uglifier::VERSION”:预编译

    我在尝试推送到生产环境时收到以下错误 这是推送的结果 git push production master Counting objects 124 done Delta compression using up to 4 threads
  • Ruby on Rails:有条件地显示部分内容

    我不确定我在这里是否采用了最好的方法 但我有一个数据块 我想在搜索完成后显示它 并且之前根本不存在 首先 没有什么可显示的 其次它引用的模型为零 因此它抛出异常 我将此块放置在部分模板中 并将其添加到布局中的适当位置 有没有办法有条件地干净
  • Sinatra 启用:会话不适用于乘客/apache

    我在启用 sessions 时遇到问题 以维持在 guest apache 上托管的简单 Sinatra 应用程序 我将会话 authorized 的状态存储在cookie 中 当托管在 Rack Handler Mongrel 上时 它可
  • Rails 删除方法不起作用

    好吧 我在 Ruby on Rails 中的删除方法上遇到了这样的问题 我想 我尝试了我读过的所有内容 但它不起作用 也许你可以帮助解决这个问题 当我单击链接时 它会重定向到患者 1 confirm Are you sure 3F meth
  • MacOS 每秒唤醒次数错误

    构建 Rails 应用程序 ruby 2 4 0p0 Rails 5 1 4 并使用我的 Macbook Air MacOS High Sierra 10 13 2 进行本地测试 我不断遇到此问题 过去 241 秒内有 45001 次唤醒
  • 在 Ruby/Sinatra 中解码 Facebook 的签名请求

    由于 Facebook 不赞成使用新的 FBML 我正在寻找一种新方法来创建 显示 选项卡 向粉丝显示一个版本 向非粉丝显示另一个版本的页面选项卡 Facebook 已将数据添加到signed request 中 当用户在应用程序中选择您的
  • Riod-iOS 错误:您没有写入权限“Gem::FilePermissionError”

    我已经下载了一个Riot iOS https github com vector im riot ios并遵循构建说明 当我跑步时 捆绑安装 回溯 最近一次调用 2 来自 usr bin bundle 23 in
  • 在 Ruby 中创建带有静态页面的博客的最佳方法

    我刚刚访问了静态网站生成 http www ruby toolbox com categories static website generation html on 红宝石工具箱 http www ruby toolbox com 我不知
  • 强制 DataMapper 断开与 postgresql 的连接

    我有一个测试 正在 postgresql 中创建和销毁多个数据库 为了能够删除数据库 我需要告诉 DataMapper 断开连接 我似乎找不到任何有关如何执行此操作的文档 DataMapper Adapters PostgresAdapte
  • 可以在哈希每个循环中访问索引吗?

    我可能遗漏了一些明显的东西 但是有没有办法访问哈希每个循环内迭代的索引 计数 hash three gt one four gt two one gt three hash each key value any way to know wh
  • Ruby 的 OpenSSL::Random 种子是否足够?

    我对 Ruby 知之甚少 所以如果答案很明显 请原谅我 我注意到在http www ruby doc org stdlib 1 9 3 libdoc securerandom rdoc SecureRandom html http www
  • Ruby 代码到 JAR

    我希望能够将 ruby 程序编译为 java JAR 程序 我研究过 JRuby 看到了几个能够 eval ruby 代码的 Java 应用程序示例 但是是否有更优雅的解决方案允许简单地用 ruby 编写所有内容 然后将其直接编译为 JAR
  • 存根 include_recipe 调用以不采取任何操作,但仍将配方计为包含的内容

    我的食谱的默认食谱仅包含其他几个食谱 我知道我可以使用以下方法测试是否包含适当的食谱 expect chef run to include recipe cookbook recipe name 但是当我像这样存根 include reci
  • 在 Rails 4 中渲染部分/rake 任务/后台作业/模型中的视图

    我读过很多关于在 rake 任务 后台作业 模型中渲染 Rails 部分和视图的内容 我在 Stackoverflow 和网络上找到的绝大多数内容都描述了在 Rails 3 中工作的方法 但它们似乎已经过时了 而且我没有让它们工作 即使花了
  • 在新的 RHEL6 服务器上安装 ruby​​-filemagic gem 时遇到困难

    它似乎正在寻找 libmagic so 1 文件 我有那个文件 它位于 usr lib64 中 我没有以 root 用户身份运行此安装 我也在使用 rvm 和 Bundler 这是我的 bundle 命令的结果 当它到达 Gemfile 中
  • 如何从数组中删除空白元素?

    我有以下数组 cities Kathmandu Pokhara Dharan Butwal 我想从数组中删除空白元素并想要以下结果 cities Kathmandu Pokhara Dharan Butwal 有没有类似的方法compact
  • 使用 Ruby 获取 AWS 区域名称

    我正在为 AWS 开发 Rails 应用程序 并希望为区域名称创建下拉菜单 例如 us east 1 等 如果有人已经创建了 gem 来获取它们 我想使用它 有人知道这样的 gem 或有用的 API 吗 适用于 Ruby 的 AWS 开发工
  • 如何使用 Ruby 2.7.0 修复 Rails 的警告消息

    有没有人解决这个问题Ruby 2 7 0 I used rbenv并安装了 Ruby v2 7 0 然后使用创建了一个 Rails 项目Rails v6 0 2 1 目前 通过运行之一 rails s rails s u puma rail
  • 在 ruby​​ 中读/写受密码保护和加密的文件

    我想加密一个 ruby 程序将从中加载数据的文件 此外 我需要程序在启动时提示输入密码 该密码将用于解密文件 换句话说 该文件需要加密地驻留在计算机上 只有拥有密码的用户才能运行该应用程序 我已经开始研究 openpgp 但据我了解 这仍然
  • Ruby 可选参数和多个参数

    我试图将方法的第一个参数设置为可选 后跟任意数量的参数 例如 def dothis value 0 args 我遇到的问题是 这似乎实际上不可能 当我打电话时dothis hey how are you good 我希望它将值设置为默认值

随机推荐