Comments (8)
FYI it's no longer recommended to install chef into a standard system ruby. You should use the official chef installation methods, known as an 'omnibus' install (http://www.getchef.com/chef/install/), I suspect that will fix your error.
This includes a separate ruby, and chef install into /opt/chef which means that all the right ruby extensions needed for chef will be compiled in (and a tested version of ruby), and compatible versions of extension libraries as well.
This is why there are different resources for gem_package
(installs to system gems) and chef_gem
(installs to the ruby that chef is currently running from)
from postgresql.
I'm using the omnibus install method, and it still breaks. This purely seems to be happening because something in the postgres recipe is installing the pg gem with native C extension.
from postgresql.
Yea I'm seeing this same issue.
from postgresql.
Same problem here. I could install pg
correctly using the system ruby1.9.1-dev
but the cookbook uses the chef embedded ruby. Somewhere something is not updated or is missing. Please fix this major issue. Here is my error trace:
Running handlers:
[2014-08-05T00:18:58+00:00] ERROR: Running exception handlers
Running handlers complete
[2014-08-05T00:18:58+00:00] ERROR: Exception handlers complete
[2014-08-05T00:18:58+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
Chef Client failed. 10 resources updated in 156.207725987 seconds
[2014-08-05T00:18:58+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-05T00:18:58+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Here is where it fails: Can't find the PostgreSQL client library (libpq)
from postgresql.
This is based on masterchef's finding and provides a workaround for the time being.
Add to your recipe before postgresql::ruby is called:
apt_package "ruby1.9.1-dev" do
action :nothing
end.run_action(:install)
Consider putting the version number into attributes as well.
from postgresql.
Same issue here, solved downgrading chef client to 11.16.2.
Seems that the workaround to bug COOK-1406 isn't working with latest chef version, in omnibus install
Sorry, it's my fault, with a clean installation of both official versions works ok. I was using an omnibus custom installation which has the issue.
from postgresql.
building pg gem is not longer a problem.
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.