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

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

    I encountered the same error with postgres installed through asdf. The pg-config solutions didn't work for me. Instead I had to locate the postgres include folder which contains the file and run the command with the --with-pg-include flag

    gem install pg -- --with-pg-include=//.asdf/installs/postgres//include
    

提交回复
热议问题