gpt4 book ai didi

ruby - Gem::Installer::ExtensionBuildError:错误:无法构建 gem native 扩展 Linux Mint

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

在运行 bundle install 时出现以下错误。在 Linux Mint 17.0 上运行导轨 4.0.2

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/home/dubzero/.rvm/rubies/ruby-2.0.0-p643/bin/ruby extconf.rb
checking for ffi_call() in -lffi... yes
checking for ffi_prep_closure()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
checking for rb_thread_blocking_region()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... yes
creating extconf.h
creating Makefile

make "DESTDIR="
compiling LastError.c
compiling Type.c
compiling ClosurePool.c
compiling MemoryPointer.c
compiling DataConverter.c
compiling DynamicLibrary.c
compiling FunctionInfo.c
compiling StructByReference.c
compiling Buffer.c
compiling Types.c
compiling Platform.c
compiling ffi.c
compiling Function.c
compiling Thread.c
compiling LongDouble.c
compiling Struct.c
compiling Variadic.c
compiling Call.c
Call.c: In function ‘rbffi_SetupCallParams’:
Call.c:206:28: error: ‘UINT32_ADJ’ undeclared (first use in this function)
ADJ(param, UINT32);
^
Call.c:83:58: note: in definition of macro ‘ADJ’
# define ADJ(p, a) ((p) = (FFIStorage*) (((char *) p) + a##_ADJ))
^
Call.c:206:28: note: each undeclared identifier is reported only once for each function it appears in
ADJ(param, UINT32);
^
Call.c:83:58: note: in definition of macro ‘ADJ’
# define ADJ(p, a) ((p) = (FFIStorage*) (((char *) p) + a##_ADJ))
^
Call.c:230:28: error: ‘UINT64_ADJ’ undeclared (first use in this function)
ADJ(param, UINT64);
^
Call.c:83:58: note: in definition of macro ‘ADJ’
# define ADJ(p, a) ((p) = (FFIStorage*) (((char *) p) + a##_ADJ))
^
make: *** [Call.o] Ошибка 1


Gem files will remain installed in /home/dubzero/.rvm/gems/ruby-2.0.0-p643@railstutorial_rails_4_0/gems/ffi-1.9.7 for inspection.
Results logged to /home/dubzero/.rvm/gems/ruby-2.0.0-p643@railstutorial_rails_4_0/gems/ffi-1.9.7/ext/ffi_c/gem_make.out
An error occurred while installing ffi (1.9.7), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.7'` succeeds before bundling.

gem 文件

source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0

gem 'rails', '4.0.2'

group :development, :test do
gem 'sqlite3', '1.3.8'
gem 'rspec-rails', '2.13.1'
end

group :test do
gem 'selenium-webdriver', '2.35.1'
gem 'capybara', '2.1.0'
end

gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'

group :doc do
gem 'sdoc', '0.3.20', require: false
end

group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end

有什么想法吗?提前谢谢你

最佳答案

尝试使用旧版本的 ffi。例如,在您的 Gemfile 中,放入:

gem 'ffi', '1.9.3'

关于ruby - Gem::Installer::ExtensionBuildError:错误:无法构建 gem native 扩展 Linux Mint,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29050249/

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