ruby-on-rails – 无法在Fedora 17上安装PG gem

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 无法在Fedora 17上安装PG gem前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

pg gem很顽固,所以我无法在新电脑上加载我的应用程序.看起来像多个问题,无法找到pg_config,然后是extconf.rb

  1. #psql working...
  2. psql (9.2.1)
  3. Type "help" for help.
  4. nd =>
  5. \q
  6. $pg_config:
  7. #adding the path to bashrc...
  8. $nano .bashrc
  9. PATH=/usr/pgsql-9.2/bin:$PATH
  10. #seems to work...
  11. pg_config: /usr/pgsql-9.2/bin/pg_config
  12. $sudo gem install pg
  13. #but i get the same errors...
  14. Building native extensions. This could take a while...
  15. .......
  16. ERROR: Error installing pg:
  17. ERROR: Failed to build gem native extension.
  18. /usr/bin/ruby extconf.rb
  19. checking for pg_config... no
  20. No pg_config... trying anyway. If building fails,please try again with
  21. --with-pg-config=/path/to/pg_config
  22. checking for libpq-fe.h... no
  23. Can't find the 'libpq-fe.h header
  24. *** extconf.rb Failed ***
  25. Could not create Makefile due to some reason,probably lack of
  26. necessary libraries and/or headers. Check the mkmf.log file for more
  27. details. You may need configuration options.

有没有处理过这个问题的linux人?

最佳答案
这是通过解决

  1. $yum install /usr/include/libpq-fe.h

猜你在找的Linux相关文章