7

pg gem が頑固なので、新しいコンピューターにアプリをロードできません。pg_config と extconf.rb を見つけることができないという複数の問題があるようです

#psql working...
psql (9.2.1)
Type "help" for help.

nd =>
\q

$ pg_config:

#adding the path to bashrc...
$ nano .bashrc

PATH=/usr/pgsql-9.2/bin:$PATH

#seems to work...
pg_config: /usr/pgsql-9.2/bin/pg_config

$ sudo gem install pg

#but i get the same errors...
Building native extensions.  This could take a while...
.......
ERROR:  Error installing pg:
        ERROR: Failed to build gem native extension.

        /usr/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.

この問題に対処した Linux 関係者はいますか?

4

4 に答える 4

21

これはで解決されます

$ yum install /usr/include/libpq-fe.h
于 2012-12-02T05:07:41.250 に答える