Can't find the 'libpq-fe.h header when trying to install pg gem

前端 未结 30 1445
深忆病人
深忆病人 2020-11-22 07:47

I am using the Ruby on Rails 3.1 pre version. I like to use PostgreSQL, but the problem is installing the pg gem. It gives me the following error:



        
30条回答
  •  不思量自难忘°
    2020-11-22 08:18

    Under CentOS 6.5 (Squeeze) I created a file:

    $ sudo touch /etc/profile.d/psql.sh
    

    with content:

    pathmunge /usr/pgsql-9.3/bin
    

    Note here, you should set your PostgreSQL path with the pg_config file. You can find this with the command:

    $ sudo find / -iname pg_config
    

    Save the file:

    $ sudo chmod +x /etc/profile.d/ruby.sh
    

    and try to execute your command again.

    Note: Anytime you change the Bash configuration - changing the profile.d configuration - you should reload Bash.

提交回复
热议问题