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

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

    I recently upgraded to Mac OS X v10.10 (Yosemite) and was having difficulty building the pg gem.

    The error reported was the typical:

    Using config values from /usr/local/bin/pg_config
    checking for libpq-fe.h... *** extconf.rb failed ***
    

    My solution was to gem uninstall pg and then bundle update pg to replace the gem with the latest. I did run brew update; brew upgrade after the Yosemite install to get the latest versions of packages I had installed previously.

提交回复
热议问题