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

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

    I found this answer, and it was the only one that worked for me (Mac OS) - after researching for about two days:

    $ sudo su
    
    $ env ARCHFLAGS="-arch x86_64" gem install pg
    
    Building native extensions.  This could take a while...
    Successfully installed pg-0.11.0
    1 gem installed
    Installing ri documentation for pg-0.11.0...
    Installing RDoc documentation for pg-0.11.0...
    

    See Stack Overflow question Can't find the PostgreSQL client library (libpq).

提交回复
热议问题