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

前端 未结 30 1439
深忆病人
深忆病人 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:36

    I had the same issue on Amazon Linux. I could find the header libpq-fe.h, but somehow it didn't work.

    It came from the different versions of the packages that were installed through the different users on the machine. PostgreSQL 9.2 and PostgreSQL 9.3 were installed. So, make sure of your PostgreSQL version before including the libraries.

    For me, the magic command line was:

    sudo yum install postgresql93 postgresql93-server postgresql93-libs postgresql93-contrib postgresql93-devel
    

    Source: An almost idiot's guide to install PostgreSQL 9.3, PostGIS 2.1 and pgRouting with Yum

提交回复
热议问题