Problema con libreria "libpq-fe.h" mientras trato de ejecutar el comando "bundle install"

210 views
Skip to first unread message

Reynier Pérez

unread,
May 6, 2014, 3:04:33 PM5/6/14
to ror...@googlegroups.com
Hola a todos, estoy comenzando o mejor dicho retomando RoR con un proyecto pequeño y sencillo, de prueba. He creado una aplicación y estoy tratando de instalar lo que necesito (no se si la palabra correcta es "gemas") ejecutando el comando:

# bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.0.4
Using i18n 0.6.4
Using multi_json 1.7.2
Using activesupport 3.2.8
Using builder 3.0.4
Using activemodel 3.2.8
Using erubis 2.7.0
Using journey 1.0.4
Using rack 1.4.5
Using rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.1
Using tilt 1.3.6
Using sprockets 2.1.3
Using actionpack 3.2.8
Using mime-types 1.21
Using polyglot 0.3.3
Using treetop 1.4.12
Using mail 2.4.4
Using actionmailer 3.2.8
Using arel 3.0.2
Using tzinfo 0.3.37
Using activerecord 3.2.8
Using activeresource 3.2.8
Using bundler 1.6.2
Using coffee-script-source 1.6.2
Using execjs 1.4.0
Using coffee-script 2.2.0
Using rack-ssl 1.3.3
Using json 1.7.7
Using rdoc 3.12.2
Using thor 0.18.0
Using railties 3.2.8
Using coffee-rails 3.2.2
Using daemons 1.1.9
Using eventmachine 1.0.0
Using multi_xml 0.5.3
Using httparty 0.9.0
Using jquery-rails 2.2.1

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

    /usr/local/rvm/rubies/ruby-2.1.1/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
        --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/rvm/rubies/ruby-2.1.1/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

extconf failed, exit code 1

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.1/gems/pg-0.14.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.1/extensions/x86-linux/2.1.0/pg-0.14.1/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.

Por lo que he leido en Internet el problema esta con las librerias de desarrollo de Postgre por lo cual he instalado "postgresql-devel":

# yum history info
Loaded plugins: fastestmirror, security
Transaction ID : 86
Begin time     : Tue May  6 13:17:42 2014
Begin rpmdb    : 813:9b44927673e9f4bb253ccef7cd2a9391187bab98
End time       :            13:17:49 2014 (7 seconds)
End rpmdb      : 815:f4686099b7e2b52a7c16eec9806299c2f0c74a18
User           : root <root>
Return-Code    : Success
Command Line   : install postgresql-devel
Transaction performed with:
    Installed     rpm-4.8.0-37.el6.i686                           @base
    Installed     yum-3.2.29-43.el6.centos.noarch                 @updates
    Installed     yum-plugin-fastestmirror-1.1.30-17.el6_5.noarch @updates
Packages Altered:
    Dep-Install postgresql92-9.2.8-1PGDG.rhel6.i686       @pgdg92
    Install     postgresql92-devel-9.2.8-1PGDG.rhel6.i686 @pgdg92
history info

Pero aun asi el problema persiste y no se que mas hacer, estoy ejecutando Ruby y RoR en CentOS 6.5, alguna idea o solución?

Rafa García

unread,
May 7, 2014, 6:13:49 AM5/7/14
to ror...@googlegroups.com
En el error además te dice que no encuentra pg_config, se lo puedes indicar de esta manera:

gem install pg -- --with-pg-config=/usr/pgsql-9.2/bin/pg_config
Nota: El path /usr/pgsql-9.2 dependerá de tu versión de PostgreSQL


Te lo comento porque allí comentan más cosas.

Saludos


--
--
You received this message because you are subscribed to the Google
Groups "ror-es" group.
To post to this group, send email to ror...@googlegroups.com
To unsubscribe from this group, send email to
ror_es+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ror_es?hl=en
Rails no escala.

---
You received this message because you are subscribed to the Google Groups "ror-es" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ror_es+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages