Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Error on installation #258

Open
iamstoick opened this issue Nov 9, 2015 · 3 comments
Open

Error on installation #258

iamstoick opened this issue Nov 9, 2015 · 3 comments

Comments

@iamstoick
Copy link

Having error in the installation in mysql part.

$ bundle install

...

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby -r ./siteconf20151109-54654-nzncoz.rb extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... 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=/usr/local/bin/$(RUBY_BASE_NAME)
    --with-mysql-dir
    --without-mysql-dir
    --with-mysql-include
    --without-mysql-include=${mysql-dir}/include
    --with-mysql-lib
    --without-mysql-lib=${mysql-dir}/lib
    --with-mysql-config
    --without-mysql-config
    --with-mysql-dir
    --without-mysql-dir
    --with-mysql-include
    --without-mysql-include=${mysql-dir}/include
    --with-mysql-lib
    --without-mysql-lib=${mysql-dir}/lib
    --with-mysqlclientlib
    --without-mysqlclientlib
    --with-mlib
    --without-mlib
    --with-mysqlclientlib
    --without-mysqlclientlib
    --with-zlib
    --without-zlib
    --with-mysqlclientlib
    --without-mysqlclientlib
    --with-socketlib
    --without-socketlib
    --with-mysqlclientlib
    --without-mysqlclientlib
    --with-nsllib
    --without-nsllib
    --with-mysqlclientlib
    --without-mysqlclientlib
    --with-mygcclib
    --without-mygcclib
    --with-mysqlclientlib
    --without-mysqlclientlib

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20151109-54654-bqf86amysql2-0.3.18/gems/mysql2-0.3.18 for inspection.
Results logged to /tmp/bundler20151109-54654-bqf86amysql2-0.3.18/extensions/x86_64-linux/2.2.0-static/mysql2-0.3.18/gem_make.out
An error occurred while installing mysql2 (0.3.18), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.18'` succeeds before bundling.
$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]

Ubuntu 14.04 64 bit.

@iamstoick
Copy link
Author

Manage to solve the above error by installing:

$ sudo apt-get install mysql-client libmysqlclient-dev

After I rerun the installation I encountered another problem.


Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby -r ./siteconf20151109-16291-19z0pb8.rb extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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/bin/$(RUBY_BASE_NAME)
    --with-pg
    --without-pg
    --enable-windows-cross
    --disable-windows-cross
    --with-pg-config
    --without-pg-config
    --with-pg_config
    --without-pg_config
    --with-pg-dir
    --without-pg-dir
    --with-pg-include
    --without-pg-include=${pg-dir}/include
    --with-pg-lib
    --without-pg-lib=${pg-dir}/lib

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20151109-16291-1vnazkvpg-0.18.3/gems/pg-0.18.3 for inspection.
Results logged to /tmp/bundler20151109-16291-1vnazkvpg-0.18.3/extensions/x86_64-linux/2.2.0-static/pg-0.18.3/gem_make.out
/usr/local/lib/ruby/2.2.0/rubygems/ext/builder.rb:89:in `run'
/usr/local/lib/ruby/2.2.0/rubygems/ext/ext_conf_builder.rb:36:in `block in build'
/usr/local/lib/ruby/2.2.0/tempfile.rb:319:in `open'
/usr/local/lib/ruby/2.2.0/rubygems/ext/ext_conf_builder.rb:19:in `build'
/usr/local/lib/ruby/2.2.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
/usr/local/lib/ruby/2.2.0/rubygems/ext/builder.rb:160:in `chdir'
/usr/local/lib/ruby/2.2.0/rubygems/ext/builder.rb:160:in `block in build_extension'
/usr/local/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/usr/local/lib/ruby/2.2.0/rubygems/ext/builder.rb:159:in `build_extension'
/usr/local/lib/ruby/2.2.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
/usr/local/lib/ruby/2.2.0/rubygems/ext/builder.rb:195:in `each'
/usr/local/lib/ruby/2.2.0/rubygems/ext/builder.rb:195:in `build_extensions'
/usr/local/lib/ruby/2.2.0/rubygems/installer.rb:702:in `build_extensions'
/usr/local/lib/ruby/2.2.0/rubygems/installer.rb:250:in `install'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/source/rubygems.rb:141:in `block in install'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/rubygems_integration.rb:147:in `preserve_paths'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/source/rubygems.rb:134:in `install'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/installer.rb:112:in `install_gem_from_spec'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/installer.rb:266:in `block in install_sequentially'
/usr/local/lib/ruby/2.2.0/forwardable.rb:183:in `each'
/usr/local/lib/ruby/2.2.0/forwardable.rb:183:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/installer.rb:265:in `install_sequentially'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/installer.rb:93:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/installer.rb:18:in `install'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/cli/install.rb:107:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/cli.rb:162:in `install'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/cli.rb:10:in `start'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/bin/bundle:20:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/bin/bundle:18:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
An error occurred while installing pg (0.18.3), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.3'` succeeds before bundling.

Solved:
$ sudo apt-get install libpostgresql-ocaml-dev

@iamstoick
Copy link
Author

Another issue.

$ bundle exec rake fulcrum:setup db:setup
rake aborted!
ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
/home/gerald/fulcrum/config/application.rb:7:in `<top (required)>'
/home/gerald/fulcrum/Rakefile:5:in `require'
/home/gerald/fulcrum/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

@lependu
Copy link

lependu commented Dec 10, 2015

Take a look at issue #115
I think there is the solution for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants