当我尝试安装gem therubyracer
时,我收到此错误:
gem install therubyracer
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
/opt/ruby-enterprise-1.8.7-2012.02/bin/ruby extconf.rb
checking for main() in -lpthread... yes
Warning! Unable to load libv8 ~> 3.16.14.
*** 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=/opt/ruby-enterprise-1.8.7-2012.02/bin/ruby
--with-pthreadlib
--without-pthreadlib
--enable-debug
--disable-debug
/opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- libv8 (LoadError)
from /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from extconf.rb:29
Gem files will remain installed in /home/speedup18meses/.gems/gems/therubyracer-0.12.1 for inspection.
Results logged to /home/speedup18meses/.gems/gems/therubyracer-0.12.1/ext/v8/gem_make.out
我使用共享服务器,因此,我没有sudo访问我的用户。 我在Rails应用程序中使用它。 我试过这个:
gem install libv8 -v '3.16.14.3' -- --with-system-v8
gem install therubyracer
gem install libv8
gem install therubyracer
我尝试安装特定版本,并编辑Gemfile,但都不起作用。
答案 0 :(得分:0)
我在Rails应用程序中使用它
然后在你的Gemfile中添加以下行:
gem 'therubyracer'
然后做:
$ bundle install
然后Bundler将处理安装依赖项。
当我尝试安装gem therubyracer时,我收到此错误:
我没有收到这个错误。扔掉你的电脑,让我的电脑和我安装的软件一起使用。