# PostgreSQL error on Raspberry Pi

**URL:** <https://discourse.libretime.org/t/postgresql-error-on-raspberry-pi/353>\
**Category:** Get Help\
**Created:** [August 31, 2019, 2:37pm UTC](https://discourse.libretime.org/t/postgresql-error-on-raspberry-pi/353 "2019-08-31T14:37:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NSCSystems](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nscsystems/32/319_2.png) [@NSCSystems](https://discourse.libretime.org/u/NSCSystems)\
**Post date:** [August 31, 2019, 2:37pm UTC](https://discourse.libretime.org/t/postgresql-error-on-raspberry-pi/353/1 "2019-08-31T14:37:27Z")

</div>

Hi. I install Libretime on my raspberry pi only one error is up. But install finished correctly.

I using command ./install

* * *

```
          * Configuring PostgreSQL *              

```

* * *

Create default airtime postgres user? (Y/n): Y  
perl: warning: Setting locale failed.  
perl: warning: Please check that your locale settings:  
LANGUAGE = “en\_US.UTF-8”,  
LC\_ALL = (unset),  
LANG = “en\_US.utf8”  
are supported and installed on your system.  
perl: warning: Falling back to the standard locale (“C”).  
psql: could not connect to server: No such file or directory  
Is the server running locally and accepting  
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?  
perl: warning: Setting locale failed.  
perl: warning: Please check that your locale settings:  
LANGUAGE = “en\_US.UTF-8”,  
LC\_ALL = (unset),  
LANG = “en\_US.utf8”  
are supported and installed on your system.  
perl: warning: Falling back to the standard locale (“C”).  
psql: could not connect to server: No such file or directory  
Is the server running locally and accepting  
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?  
bash:(): ERROR: Can’t create airtime user in PostgreSQL!

I set locale to en\_US.UTF-8. When I go to a web page then the page comes up in Database Settings and I have to enter data there. When I press “Next” I get this error message. What should I do to get to work?

Couldn’t establish a connection to the database! Please check your credentials and try again. PDO Exception: SQLSTATE[08006] [7] could not connect to server: Connection refused Is the server running on host “localhost” (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host “localhost” (127.0.0.1) and accepting TCP/IP connections on port 5432?

if i try again using ./install -fiap command, coming next error

* * *

```
          * Configuring PostgreSQL *              

```

* * *

psql: could not connect to server: No such file or directory  
Is the server running locally and accepting  
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?  
psql: could not connect to server: No such file or directory  
Is the server running locally and accepting  
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?  
bash:(): ERROR: Can’t create airtime user in PostgreSQL!

---

<div class="post-metadata">

**Author:** ![robbt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/robbt/32/15_2.png) [@robbt](https://discourse.libretime.org/u/robbt)\
**Post date:** [August 31, 2019, 2:52pm UTC](https://discourse.libretime.org/t/postgresql-error-on-raspberry-pi/353/2 "2019-08-31T14:52:49Z")

</div>

Sounds like you need to look at your postgresql logs and verify it is running correctly. As I’m responding on my phone I can’t easily point to the various sites with info on how to do this but it shouldn’t be hard to find.

---

<div class="post-metadata">

**Author:** ![NSCSystems](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nscsystems/32/319_2.png) [@NSCSystems](https://discourse.libretime.org/u/NSCSystems)\
**Post date:** [August 31, 2019, 2:57pm UTC](https://discourse.libretime.org/t/postgresql-error-on-raspberry-pi/353/3 "2019-08-31T14:57:09Z")

</div>

root@raspberrypi:/# service postgresql status  
● postgresql.service - PostgreSQL RDBMS  
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)  
Active: active (exited) since Sat 2019-08-31 14:51:40 BST; 1h 3min ago  
Main PID: 5221 (code=exited, status=0/SUCCESS)  
Tasks: 0 (limit: 4915)  
CGroup: /system.slice/postgresql.service

Aug 31 14:51:40 raspberrypi systemd[1]: Starting PostgreSQL RDBMS…  
Aug 31 14:51:40 raspberrypi systemd[1]: Started PostgreSQL RDBMS.

And postgresql log folder is empty

root@raspberrypi:/var/log/postgresql# ls  
root@raspberrypi:/var/log/postgresql#

---

<div class="post-metadata">

**Author:** ![NSCSystems](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nscsystems/32/319_2.png) [@NSCSystems](https://discourse.libretime.org/u/NSCSystems)\
**Post date:** [August 31, 2019, 3:14pm UTC](https://discourse.libretime.org/t/postgresql-error-on-raspberry-pi/353/4 "2019-08-31T15:14:14Z")

</div>

One interesting thing if i use this command pg\_lsclusters - i don’t see anything and /etc/postgresql/ folder is empty

root@raspberrypi:~# pg\_lsclusters  
Ver Cluster Port Status Owner Data directory Log file  
root@raspberrypi:~#

---

<div class="post-metadata">

**Author:** ![NSCSystems](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nscsystems/32/319_2.png) [@NSCSystems](https://discourse.libretime.org/u/NSCSystems)\
**Post date:** [August 31, 2019, 7:00pm UTC](https://discourse.libretime.org/t/postgresql-error-on-raspberry-pi/353/5 "2019-08-31T19:00:27Z")

</div>

PostgreSQL working some raspberry pi?

I install “sudo apt-get install postgresql”.

If i look Data files: /var/lib/postgresql/ this is empty  
If i look Configuration files: /etc/postgresql/ this is empty

How can i install PostgreSQL to raspberry so that both Configuration and Data folders create files

This problem can’t just be mine, it must be a problem for many who install PostgreSQL on Raspberry Pi

---

<div class="post-metadata">

**Author:** ![JohnnyC1951](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/johnnyc1951/32/605_2.png) [@JohnnyC1951](https://discourse.libretime.org/u/JohnnyC1951)\
**Post date:** [September 1, 2019, 11:00am UTC](https://discourse.libretime.org/t/postgresql-error-on-raspberry-pi/353/6 "2019-09-01T11:00:44Z")

</div>

If you are using Bionic, maybe this post might help?  
[https://discourse.libretime.org/t/getting-lt8-working-on-ubuntu-18-04-notes-postgres-solved/354](https://discourse.libretime.org/t/getting-lt8-working-on-ubuntu-18-04-notes-postgres-solved/354)

---

<div class="post-metadata">

**Author:** ![NSCSystems](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nscsystems/32/319_2.png) [@NSCSystems](https://discourse.libretime.org/u/NSCSystems)\
**Post date:** [September 1, 2019, 8:15pm UTC](https://discourse.libretime.org/t/postgresql-error-on-raspberry-pi/353/7 "2019-09-01T20:15:36Z")

</div>

I found problem. PostgreSQL 9.6 not working Debian Stretch only 9.5. If i installed 9.5 PostgreSQL working correctly.
