我想在我的 iMac 上安装“zammad”(参见https://docs.zammad.org/en/latest/install/source.html)但失败了。
错误信息如下:
An error occurred while installing libv8 (6.7.288.46.1), and Bundler cannot continue.
Make sure that `gem install libv8 -v '6.7.288.46.1' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
mini_racer was resolved to 0.2.4, which depends on
libv8
我尝试了各种方法都没有成功。我基于自制软件的最后一种方法:
- xcode已安装,最新版本包括命令行工具
通过自制软件安装v8@3.15(参见https://formulae.brew.sh/formula/v8)
brew install v8@3.15
设置路径和编译器标志
echo 'export PATH="/usr/local/opt/v8@3.15/bin:$PATH"' >> ~/.zshrc export LDFLAGS="-L/usr/local/opt/v8@3.15/lib" export CPPFLAGS="-I/usr/local/opt/v8@3.15/include"
通过 gem开始安装
gem install libv8 -v '6.7.288.46.1' -V -- --with-system-v8
安装失败并显示以下错误消息:
Error: Command 'cipd ensure -log-level error -root /Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/vendor -ensure-file /var/folders/nz/3kvygfq95mg7nbhvvdd8wwqh0000gn/T/tmpq1sLRH.ensure' returned non-zero exit status 1
________ running 'cipd ensure -log-level error -root /Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/vendor -ensure-file /var/folders/nz/3kvygfq95mg7nbhvvdd8wwqh0000gn/T/tmpq1sLRH.ensure' in '.'
Error: failed to resolve package version (line 5): bad version (not an instance ID, a ref or a tag): "M56jPzDv1620Rnm__jTMYS62Zi8rxHVq7yw0qeBFEgkC".
Running: gclient root
Running: gclient config --spec 'solutions = [
{
"url": "https://chromium.googlesource.com/v8/v8.git",
"managed": False,
"name": "v8",
"deps_file": "DEPS",
"custom_deps": {},
},
]
'
Running: gclient sync --with_branch_heads
Traceback (most recent call last):
File "/Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/vendor/depot_tools/fetch.py", line 306, in <module>
sys.exit(main())
File "/Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/vendor/depot_tools/fetch.py", line 301, in main
return run(options, spec, root)
File "/Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/vendor/depot_tools/fetch.py", line 295, in run
return checkout.init()
File "/Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/vendor/depot_tools/fetch.py", line 137, in init
self.run_gclient(*sync_cmd)
File "/Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/vendor/depot_tools/fetch.py", line 82, in run_gclient
return self.run(cmd_prefix + cmd, **kwargs)
File "/Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/vendor/depot_tools/fetch.py", line 71, in run
subprocess.check_call(cmd, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('gclient', 'sync', '--with_branch_heads')' returned non-zero exit status 1
/Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/ext/libv8/builder.rb:79:in `block in setup_build_deps!': unable to fetch v8 source (RuntimeError)
from /Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/ext/libv8/builder.rb:77:in `chdir'
from /Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/ext/libv8/builder.rb:77:in `setup_build_deps!'
from /Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/ext/libv8/builder.rb:36:in `build_libv8!'
from /Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/ext/libv8/location.rb:24:in `install!'
from extconf.rb:7:in `<main>'
ERROR: Error installing libv8:
ERROR: Failed to build gem native extension.
current directory: /Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1/ext/libv8
/Users/hollomey/.rbenv/versions/2.5.5/bin/ruby -I /Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/site_ruby/2.5.0 -r ./siteconf20200524-61596-1m99g20.rb extconf.rb --with-system-v8
Building has failed. See above output for more information on the failure.
extconf failed, exit code 1
Gem files will remain installed in /Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/libv8-6.7.288.46.1 for inspection.
Results logged to /Users/hollomey/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-19/2.5.0/libv8-6.7.288.46.1/gem_make.out
有人知道怎么做吗?
感谢您的支持
弗洛里安