# Pgsql-9.1 No such file or directory

**URL:** https://meta.discourse.org/t/pgsql-9-1-no-such-file-or-directory/53132
**Category:** Self-hosting
**Tags:** unsupported-install
**Created:** [November 19, 2016, 11:38pm UTC](https://meta.discourse.org/t/pgsql-9-1-no-such-file-or-directory/53132 "2016-11-19T23:38:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ehsan\_Gholami](https://avatars.discourse-cdn.com/v4/letter/e/9de0a6/32.png) [@Ehsan\_Gholami](https://meta.discourse.org/u/Ehsan_Gholami)
#### Post date: [November 19, 2016, 11:38pm UTC](https://meta.discourse.org/t/pgsql-9-1-no-such-file-or-directory/53132/1 "2016-11-19T23:38:20Z")

</div>

hi i use

CentOS release 6.8 (Final)

i use [THIS](https://www.digitalocean.com/community/tutorials/how-to-install-discourse-on-a-centos-6-4-x64-vps#step-5-install-and-configure-discourse) guide from digitalocean to install discourse

in installation i install pgsql-9.6 and now when i want to run  
` bundle install --deployment`  
show me this error

```
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/discourse/.rvm/rubies/ruby-2.0.0-p648/bin/ruby -r ./siteconf20161119-10988-nqqoxr.rb extconf.rb --with-pgsql-lib=/usr/pgsql-9.1/lib
--with-pg-config=/usr/pgsql-9.1/bin/pg_config
Using config values from /usr/pgsql-9.1/bin/pg_config
sh: /usr/pgsql-9.1/bin/pg_config: No such file or directory
sh: /usr/pgsql-9.1/bin/pg_config: No such file or directory
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
***extconf.rb failed***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/home/discourse/.rvm/rubies/ruby-2.0.0-p648/bin/ruby
	--with-pg
	--without-pg
	--enable-windows-cross
	--disable-windows-cross
	--with-pg-config
	--with-pg-dir
	--without-pg-dir
	--with-pg-include
	--without-pg-include=${pg-dir}/include
	--with-pg-lib
	--without-pg-lib=${pg-dir}/

extconf failed, exit code 1

Gem files will remain installed in /var/discourse/vendor/bundle/ruby/2.0.0/gems/pg-0.19.0 for inspection.
Results logged to /var/discourse/vendor/bundle/ruby/2.0.0/extensions/x86_64-linux/2.0.0/pg-0.19.0/gem_make.out

An error occurred while installing pg (0.19.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.19.0'` succeeds before bundling.

```

---

<div class="post-metadata">

### Author: ![wesochuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wesochuck/32/108706_2.png) [@wesochuck](https://meta.discourse.org/u/wesochuck)
#### Post date: [November 20, 2016, 1:58am UTC](https://meta.discourse.org/t/pgsql-9-1-no-such-file-or-directory/53132/2 "2016-11-20T01:58:44Z")

</div>

That method does not use docker. You must use docker to have a supported install of Discourse. As a benefit the docker install is much simpler to install and upgrade.

Take a look at these instructions: [discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)

The process of getting Docker installed on CentOS might differ, but once you get past that part it should be pretty smooth sailing using those instructions.

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [November 20, 2016, 2:35am UTC](https://meta.discourse.org/t/pgsql-9-1-no-such-file-or-directory/53132/3 "2016-11-20T02:35:19Z")

</div>

> Posted September 11, 2013

Might be time to ask Digital Ocean to upgrade their documentation…

---

<div class="post-metadata">

### Author: ![wesochuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wesochuck/32/108706_2.png) [@wesochuck](https://meta.discourse.org/u/wesochuck)
#### Post date: [November 20, 2016, 2:52am UTC](https://meta.discourse.org/t/pgsql-9-1-no-such-file-or-directory/53132/4 "2016-11-20T02:52:24Z")

</div>

Of course _someone_ had to beat us to the punch:

 ![](https://global.discourse-cdn.com/meta/original/3X/3/1/316c7d5e65328c63576aef2e07e2d0b66c72776f.png)
