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

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

    On FreeBSD (9.1) the necessary package is /usr/ports/database/postgresql-server* which when installed will also install the required header file that makes the gem install of "pg" fail. This answer here helped me find the solution but the difference in package names required a bit of searching.

    Hopefully this helps someone avoid a bit of head scratching when searching for the "-dev" package on a FreeBSD system!

提交回复
热议问题