Comments (12)
Same problem here.
Starting Chef Client, version 11.14.0.rc.2
Compiling Cookbooks...
Recipe: build-essential::_debian
* package[autoconf] action install (up to date)
* package[binutils-doc] action install (up to date)
* package[bison] action install (up to date)
* package[build-essential] action install (up to date)
* package[flex] action install (up to date)
* package[gettext] action install (up to date)
* package[ncurses-dev] action install (up to date)
Recipe: postgresql::client
* package[postgresql-client-9.3] action install (up to date)
* package[libpq-dev] action install (up to date)
Recipe: postgresql::ruby
* chef_gem[pg] action install
================================================================================
Error executing action `install` on resource 'chef_gem[pg]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
STDOUT: Building native extensions. This could take a while...
STDERR: ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/opt/chef/embedded/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/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... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** 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/chef/embedded/bin/ruby
--with-pg
--without-pg
--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
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib
Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1 for inspection.
Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1/ext/gem_make.out
---- End output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
Ran /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" returned 1
Cookbook Trace:
---------------
/home/vagrant/chef-solo/cookbooks-2/postgresql/recipes/ruby.rb:58:in `rescue in from_file'
/home/vagrant/chef-solo/cookbooks-2/postgresql/recipes/ruby.rb:24:in `from_file'
/home/vagrant/chef-solo/cookbooks-2/database/recipes/postgresql.rb:20:in `from_file'
/home/vagrant/chef-solo/cookbooks-2/databox/recipes/postgresql.rb:16:in `from_file'
/home/vagrant/chef-solo/cookbooks-2/databox/recipes/default.rb:12:in `from_file'
Resource Declaration:
---------------------
# In /home/vagrant/chef-solo/cookbooks-2/postgresql/recipes/ruby.rb
58: chef_gem "pg"
59: rescue Gem::Installer::ExtensionBuildError => e
Compiled Resource:
------------------
# Declared in /home/vagrant/chef-solo/cookbooks-2/postgresql/recipes/ruby.rb:58:in `rescue in from_file'
chef_gem("pg") do
provider Chef::Provider::Package::Rubygems
action :install
retries 0
retry_delay 2
guard_interpreter :default
package_name "pg"
version "0.17.1"
timeout 900
gem_binary "/opt/chef/embedded/bin/gem"
cookbook_name :postgresql
recipe_name "ruby"
end
================================================================================
Recipe Compile Error in /home/vagrant/chef-solo/cookbooks-2/databox/recipes/default.rb
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
chef_gem[pg] (postgresql::ruby line 58) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
STDOUT: Building native extensions. This could take a while...
STDERR: ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/opt/chef/embedded/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/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... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** 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/chef/embedded/bin/ruby
--with-pg
--without-pg
--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
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib
Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1 for inspection.
Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1/ext/gem_make.out
---- End output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
Ran /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" returned 1
Cookbook Trace:
---------------
/home/vagrant/chef-solo/cookbooks-2/postgresql/recipes/ruby.rb:58:in `rescue in from_file'
/home/vagrant/chef-solo/cookbooks-2/postgresql/recipes/ruby.rb:24:in `from_file'
/home/vagrant/chef-solo/cookbooks-2/database/recipes/postgresql.rb:20:in `from_file'
/home/vagrant/chef-solo/cookbooks-2/databox/recipes/postgresql.rb:16:in `from_file'
/home/vagrant/chef-solo/cookbooks-2/databox/recipes/default.rb:12:in `from_file'
Relevant File Content:
----------------------
/home/vagrant/chef-solo/cookbooks-2/postgresql/recipes/ruby.rb:
51: end
52:
53: node['postgresql']['client']['packages'].each do |pg_pack|
54: resources("package[#{pg_pack}]").run_action(:install)
55: end
56:
57: begin
58>> chef_gem "pg"
59: rescue Gem::Installer::ExtensionBuildError => e
60: # Are we an omnibus install?
61: raise if RbConfig.ruby.scan(%r{(chef|opscode)}).empty?
62: # Still here, must be omnibus. Lets make this thing install!
63: Chef::Log.warn 'Failed to properly build pg gem. Forcing properly linking and retrying (omnibus fix)'
64: gem_dir = e.message.scan(%r{will remain installed in ([^ ]+)}).flatten.first
65: raise unless gem_dir
66: gem_name = File.basename(gem_dir)
67: ext_dir = File.join(gem_dir, 'ext')
Running handlers:
[2014-08-03T12:27:53+00:00] ERROR: Running exception handlers
Running handlers complete
[2014-08-03T12:27:53+00:00] ERROR: Exception handlers complete
[2014-08-03T12:27:53+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 26.797060238 seconds
[2014-08-03T12:27:53+00:00] ERROR: chef_gem[pg] (postgresql::ruby line 58) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
STDOUT: Building native extensions. This could take a while...
STDERR: ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/opt/chef/embedded/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/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... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** 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/chef/embedded/bin/ruby
--with-pg
--without-pg
--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
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib
Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1 for inspection.
Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1/ext/gem_make.out
---- End output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
Ran /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" returned 1
[2014-08-03T12:27:53+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
ERROR: RuntimeError: chef-solo failed. See output above.
from postgresql.
I have nearly identical error output... Looks like the new Mixlib::ShellOut::ShellCommandFailed exception is the culprit
from postgresql.
I forked the develop branch to temporarily fix this and merged it to master so I could still deploy applications using this cookbook... You can point your Berksfile to it this until pull request #169 is accepted
cookbook 'postgresql', git: 'https://github.com/SimonKaluza/postgresql.git'
from postgresql.
+1
@SimonKaluza
Confirmed repo https://github.com/SimonKaluza/postgresql.git
works.
from postgresql.
👍
from postgresql.
@SimonKaluza I can also confirm that your fork of the recipe works on 14.04
from postgresql.
👍 thanks
from postgresql.
Same problem
from postgresql.
I get the same issue using cookbook 'postgresql', git: "https://github.com/SimonKaluza/postgresql.git"
and the postgresql::ruby
recipe with a target Debian 7.6 server.
What is surprising is that:
bundle install
runs fine when done manually on the server.- the patch has been merged per #169
Any idea?
from postgresql.
#169 was merged and is available in the latest supermarket versions. If this hasn't resolved the issue please re-open the issue.
from postgresql.
@slyness This worked for me (to use the supermarket version), but seems to be broken in master. I encountered the issue using the github version, but resolved w/ the supermarket version (depends 'postgresql', '~> 3.4.18'
)
from postgresql.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from postgresql.
Related Issues (20)
- Unable to connect to an RDS instance from AWS because of lack of password HOT 1
- external_pid_file and stats_temp_directory set incorrectly when installing different version than 12 (default)
- postgresql_extension install fails - NoMethodError: undefined method `[]' for nil:NilClass
- certificate verify failed (certificate has expired) - https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG HOT 2
- Cannot install with a different data directory
- Permit yum options to be passed via recipes
- Readme needs required Chef version bumping to 16.0+
- SCRAM-SHA-256 documentation
- Unable to create PostgreSQL users
- Unable to use the distribution packages HOT 3
- Converge fails in `postgresql_access`-resource HOT 1
- postgresql_access raises `NoMethodError: undefined method `named_captures' for nil:NilClass` HOT 2
- Skip YUM repository configuration in postgres_install resource
- Dependency Dashboard
- invalid pg_hba.conf when the values are longer than the defined width's HOT 1
- uninitialized constant #<Class:0x00007f3d9ecc4e70>::PostgresqlCookbook HOT 1
- Wrong PG version detected
- `pg_hba.conf` doesn't reach a stable state
- postgresql_access Resource fails when multiple databases or users are specified
- Add tests for PG 15 and 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgresql.