I am trying to install BEEF in Windows 10 PC by following the instructions given here:
https://github.com/beefproject/beef/wiki/Installation
I am stuck in the last step while doing bundle install.
I keep on getting this error:
Installing do_sqlite3 0.10.17 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
E:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160814-9372-uyjql9.rb extconf.rb
checking for sqlite3.h... no
*** 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=E:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
extconf failed, exit code 1
Gem files will remain installed in E:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/do_sqlite3-0.10.17 for inspection.
Results logged to E:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/do_sqlite3-0.10.17/gem_make.out
Using dm-do-adapter 1.2.0
Using dm-migrations 1.2.0
Using dm-serializer 1.2.2
Using qr4r 0.4.1
Using sinatra 1.4.7
Using rubydns 0.7.3
An error occurred while installing do_sqlite3 (0.10.17), and Bundler cannot
continue.
Make sure that `gem install do_sqlite3 -v '0.10.17'` succeeds before bundling.
I have tried all workarounds I got by searching the web, like compiling the header file from source and running gem install sqlite3. But none of them work.
Related
I am trying to get into Ruby on Rails. I have followed this: http://installrails.com/steps/create_your_first_app
But when I type rails new sample_app I get this error:
current directory:
c:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.1/ext/sqlite3
c:/RailsInstaller/Ruby2.3.3/bin/ruby.exe -r ./siteconf20190630-14364-17waap6.rb
extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first.
*** 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=c:/RailsInstaller/Ruby2.3.3/bin/$(RUBY_BASE_NAME)
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-config
--without-sqlite3-config
--with-pkg-config
--without-pkg-config
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
c:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sqlite3-1.4.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
c:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.1 for
inspection.
Results logged to
c:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sqlite3-1.4.1/gem_make.out
An error occurred while installing sqlite3 (1.4.1), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.4.1'` succeeds before bundling.
In Gemfile:
sqlite3
But if I then runs the gem install sqlite3 -v '1.4.1' line, I get this message, which looks like a success.
gem install sqlite3
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-x86_64-sqlite3
advarsel: mingw-w64-x86_64-sqlite3-3.27.2-2 er opdateret - springer over
Building native extensions. This could take a while...
Successfully installed sqlite3-1.4.1
Parsing documentation for sqlite3-1.4.1
Done installing documentation for sqlite3 after 2 seconds
1 gem installed
But I still can't create a new project.
Any Ideas?
Execute below commands it may help to you
ridk exec pacman -S mingw-w64-x86_64-sqlite3
ridk exec pacman -S mingw-w64-x86_64-dlfcn
gem install sqlite3
bundle install
whenever I try to install the gem:
gem install sqlite3-ruby
I get the following output:
D:/Ruby/bin/ruby.exe extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first.
*** 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=D:/Ruby/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}/
--enable-local
--disable-local
I have properly installed sqlite3 on my Windows:
D:\>sqlite3
SQLite version 3.7.16.2 2013-04-12 11:52:43
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
This is my second attempt of installation and again I get the same error message.
The problem was that I was using ruby 2.x (currently beta and not working with sqlite3) instead of 1.9.3.
You need to install SQLite first, so that you get the development headers required for the ruby gem to work.
Go to http://mislav.uniqpath.com/rails/install-sqlite3/#windows, and follow the instructions. Then the gem installation should succeed.
Obviosly your error-message says "Install SQLite3 ... first."
try:
gem install sqlite3
please keep me informed if this solved your problem.
it says
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/home/Fash/.rvm/rubies/ruby-1.9.3-p194/bin/ruby.exe extconf.rb --with-sqlite3-include=/usr/local/include
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** 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
--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=/home/Fash/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
--enable-local
--disable-local
Gem files will remain installed in /home/Fash/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/sqlite3-1.3.6 for inspection.
Results logged to /home/Fash/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out
i am using cygwin
The problem is in compilation of required libraries to install sqlite3.
Check this SO Question for steps to solve this.
I have added the gem 'sunspot_rails' in my gem file and ran bundle install. I have been getting errors in installing libv8 and the error message is as follows:
Installing libv8 (3.3.10.4) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/opt/local/bin/ruby extconf.rb
*** 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
--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/local/bin/ruby
extconf.rb:13: uninitialized constant Gem (NameError)
Checking for Python...
Gem files will remain installed in /Users/sonyakim/.rvm/gems/ruby-1.9.2-p290/gems/libv8-3.3.10.4 for inspection.
Results logged to /Users/sonyakim/.rvm/gems/ruby-1.9.2-p290/gems/libv8-3.3.10.4/ext/libv8/gem_make.out
An error occured while installing libv8 (3.3.10.4), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.3.10.4'` succeeds before bundling.
When I run gem install libv8 -v '3.3.10.4', the following error message is printed:
Building native extensions. This could take a while...
ERROR: Error installing libv8:
ERROR: Failed to build gem native extension.
/opt/local/bin/ruby extconf.rb
*** 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
--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/local/bin/ruby
extconf.rb:13: uninitialized constant Gem (NameError)
Checking for Python...
Gem files will remain installed in /Users/sonyakim/.rvm/gems/ruby-1.9.2-p290/gems/libv8-3.3.10.4 for inspection.
Results logged to /Users/sonyakim/.rvm/gems/ruby-1.9.2-p290/gems/libv8-3.3.10.4/ext/libv8/gem_make.out
How can I install libv8 properly?
Force extconf.rb file to require rubygems on install:
RUBYOPT=-rrubygems gem install libv8 -v '3.3.10.4'
Found here: https://coderwall.com/p/y1djxq
When I try install sqlite3-ruby, I get
# gem install sqlite3-ruby
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for sqlite3_initialize()... no
sqlite3-ruby only supports sqlite3 versions 3.6.16+, please upgrade!
*** 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.2-p180/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
--with-sqlite3lib
--without-sqlite3lib
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.2-p180/gems/sqlite3-1.3.3 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.2-p180/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out
And I have this packages installed
i A libdbd-sqlite3-ruby1.8 - Ruby/DBI SQLite driver for Ruby 1.8
i A libsqlite3-0 - SQLite 3 shared library
i libsqlite3-dev - SQLite 3 development files
i libsqlite3-ruby - SQLite3 interface for Ruby
i A libsqlite3-ruby1.8 - SQLite3 interface for Ruby 1.8
i sqlite3 - A command line interface for SQLite 3
It looks like you need to update your sqlite3 version. Not any gem, but the actual sqlite3 package. Use your distribution's package manager to upgrade to a version of sqlite3 >= 3.6.16+, or compile it from source (obtainable here)