• SupportRuby
  • Error when trying to install Redmine - libpq-fe.h missing

I'm currently trying to install Redmine, and I am up to the point of doing the bundle install as per their documentation.

The bundle installation is failing because file 'libpq-fe.h' is not found. According to some Stack overflow answers, this was fixed by installing the 'libpq-dev' package.

Is there an alternative solution that would be possible for shared hosting users?

Hi Josh, the package you need should be installed now.

    klynton

    Hi Klyton, thank you for installing the package. I am still getting the same error as before. The output suggests manually specifying a path for pg_config, specifically --with-pg-config=/path/to/pg_config

    Would you know what path I should give to that argument? I looked in some of the locations where I might expect to find the libpq-fe.h file, but wasn't able to locate it on the system anywhere. I didn't want to use find as I figured that would probably cause a lot of alerts.

    • sean replied to this.

      joshb Our PostgreSQL installation prefix is /usr/pgsql-11 so please try --with-pg-config=/usr/pgsql-11/bin/pg_config.

        sean Hi Sean,

        So far I have not been able to get it to work at all. I'm trying the gem command alone (as is also suggested by the bundle tool), specifying pg-config made no difference, so I also tried --with pg-include=/usr/pgsql-11/include and --with pg-dir=/usr/pgsql-11

        In all cases I am getting the same error, that it can't find the libpq-fe.h file. I see it in the /usr/pgsql-11/include directory but have not been able to get the gem tool to see it. Would you have suggestions for anything else I could try?

        • sean replied to this.

          joshb Can you please try running export PATH=/usr/pgsql-11/bin/:$PATH prior to running bundle and let me know if that makes a difference for you?

          Hi Sean, yep, that did the trick! Thank you.

          Mastodon