Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Component/s: postgresql
-
Labels:
-
Environment:
Ubuntu
Description
The make package is required by the pg gem to build itself. This is not a required/base package on debian/ubuntu platforms. Since the gem is currently built/installed in the compile phase the build-essential cookbook cannot be used to remedy this issue.
Here is a sample run on an Ubuntu 11.10 box without make installed:
Vagrant Log
[default] Importing base box 'oneiric32-20111221'... [default] The guest additions on this VM do not match the install version of VirtualBox! This may cause things such as forwarded ports, shared folders, and more to not work properly. If any of those things fail on this machine, please update the guest additions and repackage the box. Guest Additions Version: 4.1.2 VirtualBox Version: 4.1.8 [default] Matching MAC address for NAT networking... [default] Clearing any previously set forwarded ports... [default] Forwarding ports... [default] -- ssh: 22 => 2200 (adapter 1) [default] Creating shared folders metadata... [default] Running any VM customizations... [default] Booting VM... [default] Waiting for VM to boot. This can take a few minutes. [default] VM booted and ready for use! [default] Setting host name... [default] Mounting shared folders... [default] -- v-root: /vagrant [default] -- v-csr-3: /tmp/vagrant-chef-1/chef-solo-3/roles [default] -- v-csc-2: /tmp/vagrant-chef-1/chef-solo-2/cookbooks [default] -- v-csc-1: /tmp/vagrant-chef-1/chef-solo-1/cookbooks [default] -- v-csdb-4: /tmp/vagrant-chef-1/chef-solo-4/data_bags [default] Running provisioner: Vagrant::Provisioners::ChefSolo... [default] Generating chef JSON and uploading... [default] Running chef-solo... [default] stdin: is not a tty : stderr [default] [Fri, 30 Dec 2011 22:04:58 +0000] INFO: *** Chef 0.10.8 *** : stdout [default] [Fri, 30 Dec 2011 22:04:59 +0000] INFO: Setting the run_list to ["recipe[postgresql::client]"] from JSON : stdout [default] [Fri, 30 Dec 2011 22:04:59 +0000] INFO: Run List is [recipe[postgresql::client]] : stdout [default] [Fri, 30 Dec 2011 22:04:59 +0000] INFO: Run List expands to [postgresql::client] : stdout [default] [Fri, 30 Dec 2011 22:04:59 +0000] INFO: Starting Chef Run for fanfare.vagrantup.com : stdout [default] [Fri, 30 Dec 2011 22:04:59 +0000] INFO: Running start handlers : stdout [default] [Fri, 30 Dec 2011 22:04:59 +0000] INFO: Start handlers complete. : stdout [default] [Fri, 30 Dec 2011 22:04:59 +0000] INFO: Processing package[postgresql-client] action install (postgresql::client line 37) : stdout [default] [Fri, 30 Dec 2011 22:05:20 +0000] INFO: package[postgresql-client] installed version 9.1+122ubuntu1 : stdout [default] [Fri, 30 Dec 2011 22:05:20 +0000] INFO: Processing package[libpq-dev] action install (postgresql::client line 37) : stdout [default] [Fri, 30 Dec 2011 22:05:41 +0000] INFO: package[libpq-dev] installed version 9.1.1-1 : stdout [default] [Fri, 30 Dec 2011 22:05:41 +0000] INFO: Processing gem_package[pg] action install (postgresql::client line 42) : stdout [default] [Fri, 30 Dec 2011 22:05:53 +0000] ERROR: gem_package[pg] (postgresql::client line 42) has had an error : stdout [default] [Fri, 30 Dec 2011 22:05:53 +0000] ERROR: Running exception handlers : stdout [default] [Fri, 30 Dec 2011 22:05:53 +0000] ERROR: Exception handlers complete : stdout [default] [Fri, 30 Dec 2011 22:05:53 +0000] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out : stdout [default] [Fri, 30 Dec 2011 22:05:53 +0000] FATAL: Gem::Installer::ExtensionBuildError: gem_package[pg] (postgresql::client line 42) had an error: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /opt/vagrant_ruby/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 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 PQgetCancel()... yes checking for lo_create()... yes checking for pg_encoding_to_char()... yes checking for PQsetClientEncoding()... yes checking for rb_encdb_alias()... no checking for rb_enc_alias()... no checking for struct pgNotify.extra in libpq-fe.h... yes checking for unistd.h... yes creating extconf.h creating Makefile make sh: make: not found Gem files will remain installed in /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/pg-0.12.0 for inspection. Results logged to /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/pg-0.12.0/ext/gem_make.out : stdout The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! chef-solo -c /tmp/vagrant-chef-1/solo.rb -j /tmp/vagrant-chef-1/dna.json The output of the command prior to failing is outputted below: [no output]
Issue Links
- relates to
-
COOK-1441
Refactor mysql, postgresql and database cookbooks for package installation, and Ruby libraries
-
Branch providing solution is available at:
https://github.com/fnichol/chef-cookbooks/tree/COOK-956
("Pull request": https://github.com/fnichol/chef-cookbooks/compare/upstream-master...COOK-956)