gpt4 book ai didi

ruby - 无法安装 therubyracer

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

我正在尝试在 Debian 6 上执行 gem install therubyracer。我在 1.9.3 上使用 rbenv。当我最初这样做时,它提示 libv8,所以我做了一个 gem install libv8。现在,当我运行 gem install therubyracer 时,出现以下错误,提示找不到该文件。它正在谈论的文件,/home/chop/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.3-x86_64-linux/vendor/v8/out/然而,x64.release/obj.target/tools/gyp/libv8_base.a 确实存在。

hop@fev-temp:~$ gem install therubyracer
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.

/home/chop/.rbenv/versions/1.9.3-p327/bin/ruby extconf.rb
checking for main() in -lpthread... yes
creating Makefile

make
compiling stack.cc
compiling accessor.cc
compiling constants.cc
compiling heap.cc
compiling init.cc
compiling primitive.cc
compiling signature.cc
compiling date.cc
compiling locker.cc
compiling exception.cc
compiling gc.cc
compiling script.cc
compiling external.cc
compiling v8.cc
compiling object.cc
compiling trycatch.cc
compiling context.cc
compiling string.cc
compiling value.cc
compiling array.cc
compiling invocation.cc
compiling message.cc
compiling constraints.cc
compiling function.cc
compiling backref.cc
compiling handles.cc
compiling template.cc
compiling rr.cc
linking shared-object v8/init.so
/home/chop/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.3-x86_64-linux/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a: could not read symbols: No such file or directory
collect2: ld returned 1 exit status
make: *** [init.so] Error 1


Gem files will remain installed in /home/chop/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/therubyracer-0.11.0 for inspection.
Results logged to /home/chop/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/therubyracer-0.11.0/ext/v8/gem_make.out

最佳答案

我刚刚遇到了完全相同的错误。我在 https://rubygems.org/gems/therubyracer 查看了 gem 的详细信息看起来我们很“幸运”地在发布当天捆绑了一个新版本。

这似乎已经被报道过:https://github.com/cowboyd/therubyracer/issues/215

所以,我认为最简单的方法是使用最新版本的 gem。所以我更新了我的 Gemfile 以指向最后一个版本,如下所示:

gem "therubyracer", "~> 0.10.2"

我能够成功安装 gem。

如果你想手动安装gem,你可以使用:

gem install therubyracer --version "~> 0.10.2"

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

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