having trouble running the line gem install compass in terminal. It's returning the following error. Is anyone able to help out with this problem?
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby -r ./siteconf20150225-51908-cfetpz.rb extconf.rb
checking for ffi.h... *** 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/rvm/rubies/ruby-1.9.3-p392/bin/ruby
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:381:in
try_do': The compiler failed to generate an executable file.
(RuntimeError)
You have to install development tools first.
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:506:in
try_cpp'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:931:in
block in have_header'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:790:in
block in checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in
block (2 levels) in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in
open'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in
block in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in
open'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:280:in
postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:789:in
checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:930:in
have_header'
from extconf.rb:16:in'
extconf failed, exit code 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p392/gems/ffi-1.9.6 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p392/extensions/x86_64-darwin-10/1.9.1-static/ffi-1.9.6/gem_make.out
The error you're getting is
(RuntimeError)
You have to install development tools first.
If you're on OS X (my best guess from the output) you need to install the Xcode developer tools first. You can do this with the command: xcode-select --install.
Related
apple#Apples-MacBook-Pro ~ % gem install cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Users/apple/.gem/gems/ffi-1.15.5/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20220205-1416-c2i0ye.rb extconf.rb
checking for ffi.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--enable-system-libffi
--disable-system-libffi
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in with_werror' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in block in have_header' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in block (2 levels) in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in block in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in have_header' from extconf.rb:10:in system_libffi_usable?'
from extconf.rb:42:in `'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/apple/.gem/extensions/universal-darwin-20/2.6.0/ffi-1.15.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/apple/.gem/gems/ffi-1.15.5 for inspection.
Results logged to /Users/apple/.gem/extensions/universal-darwin-20/2.6.0/ffi-1.15.5/gem_make.out
I use this command in terminal to installing Compass
sudo gem install compass
but i have this error
Building native extensions. This could take a while...
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20151009-533-1bqe35q.rb extconf.rb
checking for ffi.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1038:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:889:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:888:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1037:in `have_header'
from extconf.rb:16:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.10 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/ffi-1.9.10/gem_make.out
I accepted xcode command line license agreement, but still have problem on installing this gem. please help to me.
also maybe need to know I updated my gems with this command
sudo gem update --system
based on this link: http://compass-style.org/install/
I am trying to install the stripe gem and I'm getting this error
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/bin/ruby -r ./siteconf20151005-1267-af6sn6.rb extconf.rb checking for main() in
-lstdc++... * 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=/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/bin/ruby
--with-static-libstdc++ --without-static-libstdc++ --with-stdc++lib
--without-stdc++lib
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:434:in
try_do': The compiler failed to generate an executable file.
(RuntimeError) You have to install development tools first. from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:519:in
try_link0' from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:534:in
try_link' from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:714:in
try_func' from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:944:in
block in have_library' from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:889:in
block in checking_for' from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:340:in
block (2 levels) in postpone' from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:310:in
open' from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:340:in
block in postpone' from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:310:in
open' from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:336:in
postpone' from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:888:in
checking_for' from
/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:939:in
have_library' from extconf.rb:6:in'
extconf failed, exit code 1
Gem files will remain installed in
/Users/Fysh/.rvm/gems/ruby-2.0.0-p643/gems/unf_ext-0.0.7.1 for
inspection. Results logged to
/Users/Fysh/.rvm/gems/ruby-2.0.0-p643/extensions/x86_64-darwin-14/2.0.0-static/unf_ext-0.0.7.1/gem_make.out
An error occurred while installing unf_ext (0.0.7.1), and Bundler
cannot continue. Make sure that gem install unf_ext -v '0.0.7.1'
succeeds before bundling.
Solved had an xcode update after I updated it worked.
I have this note in terminal.
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150919-3961-k5bsnl.rb extconf.rb
checking for ffi.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1044:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1043:in `have_header'
from extconf.rb:16:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.6 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/ffi-1.9.6/gem_make.out
If you have brew than I would recommend that you install ffi library by type in command line
brew install libffi
After that try to install you gem
gem install ffi
There is this line in the error message:
You have to install development tools first.
Please ensure that you have XCode and the Xcode Command Line Toolsinstalled. Please open XCode at least once to accept the licence agreement.
I tried creating a new rails application in command line and had the following error. What's the problem?
I have tried working it out myself, but I'm new to coding and even reading through it I'm completely lost!
/Users/johnsway/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
checking for sqlite3.h... *** 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=/Users/johnsway/.rvm/rubies/ruby-2.1.2/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
/Users/johnsway/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/johnsway/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:587:in `try_cpp'
from /Users/johnsway/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:1120:in `block in find_header'
from /Users/johnsway/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from /Users/johnsway/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /Users/johnsway/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/johnsway/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from /Users/johnsway/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/johnsway/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from /Users/johnsway/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from /Users/johnsway/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:1119:in `find_header'
from extconf.rb:30:in `<main>'
extconf failed, exit code 1
If you need anything else, please feel free to ask!
Thank you for your help!
Perhaps this problem has to do with a recent update of XCode. After a XCode update you need to do the following steps:
Open Xcode and accept the license agreement
Reinstall the Command Line Tools.
The second step seems to depend on your OS versions. If xcode-select --install does not work try to start the Install Command Line Developer Tools app in /System/Library/CoreServices.
After reinstalling the Command Line Tools try to rerun bundle install.