Skip to content

Instantly share code, notes, and snippets.

@rishabhmhjn
Last active January 4, 2016 21:48
Show Gist options
  • Select an option

  • Save rishabhmhjn/8682989 to your computer and use it in GitHub Desktop.

Select an option

Save rishabhmhjn/8682989 to your computer and use it in GitHub Desktop.
bundle install troubleshooting on osx
## Error log
# Using dm-do-adapter (1.2.0)
# Using dm-master-slave-adapter (0.0.4)
# Installing do_mysql (0.10.13)
# Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
#
# /Users/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
# 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
# --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/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby
# --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
#
#
# Gem files will remain installed in /usr/local/projects/project1/vendor/bundle/ruby/1.9.1/gems/do_mysql-0.10.13 for inspection.
# Results logged to /usr/local/projects/project1/vendor/bundle/ruby/1.9.1/gems/do_mysql-0.10.13/ext/do_mysql/gem_make.out
#
# An error occurred while installing do_mysql (0.10.13), and Bundler cannot continue.
# Make sure that `gem install do_mysql -v '0.10.13'` succeeds before bundling.
# Include mysql folder in $PATH variable
export PATH=$PATH:/PATH/TO/mysql/bin/
env ARCHFLAGS="-arch i386" bundle install path=vendor/bundle
## Error log
# Using dm-mysql-adapter (1.2.0)
# Installing do_postgres (0.10.13)
# Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
#
# /Users/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
# checking for main() in -lpq... yes
# checking for libpq-fe.h... yes
# checking for libpq/libpq-fs.h... yes
# checking for postgres.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
# --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/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby
# --with-pgsql-server-dir
# --without-pgsql-server-dir
# --with-pgsql-server-include=${pgsql-server-dir}/include
# --with-pgsql-server-lib
# --without-pgsql-server-lib=${pgsql-server-dir}/lib
# --with-pgsql-client-dir
# --without-pgsql-client-dir
# --with-pgsql-client-include
# --without-pgsql-client-include=${pgsql-client-dir}/include
# --with-pgsql-client-lib
# --without-pgsql-client-lib=${pgsql-client-dir}/lib
# --with-pqlib
# --without-pqlib
# Could not find PostgreSQL build environment (libraries & headers): Makefile not created
#
#
# Gem files will remain installed in /usr/local/projects/project1/vendor/bundle/ruby/1.9.1/gems/do_postgres-0.10.13 for inspection.
# Results logged to /usr/local/projects/project1/vendor/bundle/ruby/1.9.1/gems/do_postgres-0.10.13/ext/do_postgres/gem_make.out
#
# An error occurred while installing do_postgres (0.10.13), and Bundler cannot continue.
# Make sure that `gem install do_postgres -v '0.10.13'` succeeds before bundling.
export CONFIGURE_ARGS="--with-pgsql-server-include=/opt/local/include/postgresql84/server/:/opt/local/include/postgresql84/"
env ARCHFLAGS="-arch i386" bundle install path=vendor/bundle
## Error log
# Installing mysql2 (0.3.12b6)
# Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
#
# /Users/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
# checking for rb_thread_blocking_region()... yes
# checking for rb_wait_for_single_fd()... yes
# checking for rb_hash_dup()... yes
# checking for mysql.h... no
# checking for mysql/mysql.h... no
# -----
# mysql.h is missing. please check your installation of mysql and try again.
# -----
# *** 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=/Users/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby
# --with-mysql-config
# --without-mysql-config
#
#
# Gem files will remain installed in /usr/local/projects/project1/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.12b6 for inspection.
# Results logged to /usr/local/projects/project1/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.12b6/ext/mysql2/gem_make.out
#
# An error occurred while installing mysql2 (0.3.12b6), and Bundler cannot continue.
# Make sure that `gem install mysql2 -v '0.3.12b6'` succeeds before bundling.
# Refer: http://stackoverflow.com/a/17262871/842214
env ARCHFLAGS="-arch i386" bundle install --path=vendor/bundle/
## Error log
# Installing fluent-plugin-mail (0.0.2)
# Installing pg (0.14.1)
# Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
#
# /Users/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby 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
# --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/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby
# --with-pg
# --without-pg
# --with-pg-dir
# --without-pg-dir
# --with-pg-include
# --without-pg-include=${pg-dir}/include
# --with-pg-lib
# --without-pg-lib=${pg-dir}/lib
# --with-pg-config
# --without-pg-config
# --with-pg_config
# --without-pg_config
#
#
# Gem files will remain installed in /usr/local/projects/project1/vendor/bundle/ruby/1.9.1/gems/pg-0.14.1 for inspection.
# Results logged to /usr/local/projects/project1/vendor/bundle/ruby/1.9.1/gems/pg-0.14.1/ext/gem_make.out
#
# An error occurred while installing pg (0.14.1), and Bundler cannot continue.
# Make sure that `gem install pg -v '0.14.1'` succeeds before bundling.
export CONFIGURE_ARGS="--with-pg-include=/opt/local/include/postgresql84/server/:/opt/local/include/postgresql84/"
env ARCHFLAGS="-arch i386" bundle install path=vendor/bundle
# Installing pg (0.14.1)
# Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
#
# /Users/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby 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... yes
# checking for libpq/libpq-fs.h... yes
# checking for pg_config_manual.h... yes
# checking for PQconnectdb() in -lpq... yes
# checking for PQconnectionUsedPassword()... yes
# checking for PQisthreadsafe()... yes
# checking for PQprepare()... yes
# checking for PQexecParams()... yes
# checking for PQescapeString()... yes
# checking for PQescapeStringConn()... yes
# checking for PQescapeLiteral()... yes
# checking for PQescapeIdentifier()... yes
# checking for PQgetCancel()... yes
# checking for lo_create()... yes
# checking for pg_encoding_to_char()... yes
# checking for pg_char_to_encoding()... yes
# checking for PQsetClientEncoding()... yes
# checking for PQlibVersion()... yes
# checking for PQping()... yes
# checking for rb_encdb_alias()... yes
# checking for rb_enc_alias()... no
# checking for PGRES_COPY_BOTH in libpq-fe.h... no
# checking for PGRES_SINGLE_TUPLE in libpq-fe.h... no
# checking for struct pgNotify.extra in libpq-fe.h... yes
# checking for unistd.h... yes
# checking for ruby/st.h... yes
# creating extconf.h
# creating Makefile
#
# make
# compiling pg.c
# pg.c: In function 'pg_s_library_version':
# pg.c:273: warning: implicit declaration of function 'PQlibVersion'
# pg.c: In function 'Init_pg_ext':
# pg.c:384: error: 'PQPING_OK' undeclared (first use in this function)
# pg.c:384: error: (Each undeclared identifier is reported only once
# pg.c:384: error: for each function it appears in.)
# pg.c:386: error: 'PQPING_REJECT' undeclared (first use in this function)
# pg.c:388: error: 'PQPING_NO_RESPONSE' undeclared (first use in this function)
# pg.c:390: error: 'PQPING_NO_ATTEMPT' undeclared (first use in this function)
# make: *** [pg.o] Error 1
#
#
# Gem files will remain installed in /usr/local/projects/project1/vendor/bundle/ruby/1.9.1/gems/pg-0.14.1 for inspection.
# Results logged to /usr/local/projects/project1/vendor/bundle/ruby/1.9.1/gems/pg-0.14.1/ext/gem_make.out
export PATH=/opt/local/lib/postgresql84/bin:$PATH
env ARCHFLAGS="-arch i386" bundle install path=vendor/bundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment