# There was an error creating the database!

**URL:** <https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53>\
**Category:** Get Help\
**Created:** [November 13, 2017, 3:54pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53 "2017-11-13T15:54:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![NurLutix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nurlutix/32/95_2.png) [@NurLutix](https://discourse.libretime.org/u/NurLutix)\
**Post date:** [November 13, 2017, 3:54pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/1 "2017-11-13T15:54:21Z")

</div>

Hello  
During the installation I get the following error message:

 ![13 16-41-25](https://canada1.discourse-cdn.com/flex036/uploads/libretime/original/1X/3a522d39832c054b1dbe59d41740250cda6746e1.png)

Operating: Ubuntu 16.04  
I have already reinstalled Ubuntu.  
Can anyone help me?

Greetings,  
Luca

---

<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:** [November 13, 2017, 10:21pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/2 "2017-11-13T22:21:01Z")

</div>

Ok, did you run the install as  
sudo ./install -fiap ?

Try that and then try again. You should have postgresql installed and setup with a default username of airtime and default password of airtime. I just spent the day looking into the install code.

Not sure why this would have an error at this part in the process if your database exists. There is a check prior to this that should check to see if there are credentials to create the database.

Also feel free to share more details about the whether this a VPS or physical device.

---

<div class="post-metadata">

**Author:** ![NurLutix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nurlutix/32/95_2.png) [@NurLutix](https://discourse.libretime.org/u/NurLutix)\
**Post date:** [November 14, 2017, 1:16pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/3 "2017-11-14T13:16:42Z")

</div>

I’ll try the command tomorrow.

So far I’ve done everything with ./install

---

<div class="post-metadata">

**Author:** ![NurLutix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nurlutix/32/95_2.png) [@NurLutix](https://discourse.libretime.org/u/NurLutix)\
**Post date:** [November 14, 2017, 2:24pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/4 "2017-11-14T14:24:05Z")

</div>

Hello! I continue to receive the error message!

Some data from my root server:  
Operating: Ubuntu 16.04 Xenial LTS Expert Extended (64-Bit)  
Processor: Intel Core i7-2600K  
RAM: 32 GB

What information do you need?

---

<div class="post-metadata">

**Author:** ![NurLutix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nurlutix/32/95_2.png) [@NurLutix](https://discourse.libretime.org/u/NurLutix)\
**Post date:** [November 14, 2017, 2:40pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/5 "2017-11-14T14:40:05Z")

</div>

And you can tell me how to create a database. He doesn’t seem to get it.

---

<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:** [November 14, 2017, 7:31pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/6 "2017-11-14T19:31:28Z")

</div>

Ok, hmm can you try to manually login to postgresql with the user airtime and password airtime and create the database.  
This can be done by typing psql -h localhost -U airtime -W  
and then typing in airtime for the password  
once in type  
`\l`  
and it should show you a list of databases if you get this far and you don’t see the airtime database try  
`create database airtime;`

If there is an error somewhere in the process let me know, otherwise try  
`\l` again and see if it is now there and you can try the install again.

---

<div class="post-metadata">

**Author:** ![NurLutix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nurlutix/32/95_2.png) [@NurLutix](https://discourse.libretime.org/u/NurLutix)\
**Post date:** [November 14, 2017, 7:41pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/7 "2017-11-14T19:41:35Z")

</div>

root@root403:~# psql -h localhost -U airtime -W  
Password for user airtime:  
psql: FATAL: password authentication failed for user "airtime"  
FATAL: password authentication failed for user “airtime”

---

<div class="post-metadata">

**Author:** ![NurLutix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nurlutix/32/95_2.png) [@NurLutix](https://discourse.libretime.org/u/NurLutix)\
**Post date:** [November 14, 2017, 7:42pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/8 "2017-11-14T19:42:06Z")

</div>

Where can I find the password?

---

<div class="post-metadata">

**Author:** ![NurLutix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nurlutix/32/95_2.png) [@NurLutix](https://discourse.libretime.org/u/NurLutix)\
**Post date:** [November 14, 2017, 7:51pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/9 "2017-11-14T19:51:06Z")

</div>

Sorry if I’m annoying. Only my old server worked. This strikes.

---

<div class="post-metadata">

**Author:** ![NurLutix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nurlutix/32/95_2.png) [@NurLutix](https://discourse.libretime.org/u/NurLutix)\
**Post date:** [November 14, 2017, 8:11pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/10 "2017-11-14T20:11:09Z")

</div>

Password was airtime. Sorry I didn’t see that. Now comes the following:  
root@root403:~# psql -h localhost -U airtime -W  
Password for user airtime:  
psql: FATAL: database “airtime” does not exist

---

<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:** [November 14, 2017, 8:19pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/11 "2017-11-14T20:19:23Z")

</div>

Ok, this is weird. I thought that command wouldn’t require the database to exist to let you login. I’m not sure why there is this issue as the issue is with creating the database.

See if you can get in to run the \l command by going in with this command  
`sudo -u postgres psql`

---

<div class="post-metadata">

**Author:** ![NurLutix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nurlutix/32/95_2.png) [@NurLutix](https://discourse.libretime.org/u/NurLutix)\
**Post date:** [November 14, 2017, 8:22pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/12 "2017-11-14T20:22:43Z")

</div>

Now I was logged in and created the database airtime. Now, how do I set the user airtime to get the rights? This is where definately now stands: The database was installed with an incorrect encoding type!

---

<div class="post-metadata">

**Author:** ![NurLutix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/nurlutix/32/95_2.png) [@NurLutix](https://discourse.libretime.org/u/NurLutix)\
**Post date:** [November 15, 2017, 10:05pm UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/13 "2017-11-15T22:05:41Z")

</div>

Does anyone know any further? I have no idea at this point.

---

<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:** [November 17, 2017, 2:33am UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/14 "2017-11-17T02:33:29Z")

</div>

I’m not sure exactly. How did you determine the database was installed with incorrect encoding type ?

I don’t have all of postgresql commands memorized but looking at the installer code it runs something like `CREATE DATABASE airtime WITH ENCODING 'UTF8' TEMPLATE template0 OWNER airtime`

Try that and see if it works.

---

<div class="post-metadata">

**Author:** ![zoschel](https://avatars.discourse-cdn.com/v4/letter/z/71e660/32.png) [@zoschel](https://discourse.libretime.org/u/zoschel)\
**Post date:** [November 19, 2017, 9:29am UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/15 "2017-11-19T09:29:16Z")

</div>

Hello, ive same issuem debian 9.2

 ![libretimedeb9-1](https://canada1.discourse-cdn.com/flex036/uploads/libretime/original/1X/c068205c31bb7d479d2cbe464e605884e6cd4bc6.png)

---

<div class="post-metadata">

**Author:** ![zoschel](https://avatars.discourse-cdn.com/v4/letter/z/71e660/32.png) [@zoschel](https://discourse.libretime.org/u/zoschel)\
**Post date:** [November 19, 2017, 9:29am UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/16 "2017-11-19T09:29:58Z")

</div>

![libretimedeb9](https://canada1.discourse-cdn.com/flex036/uploads/libretime/original/1X/38c01a55c90edc43086c123df5e8c2bf01f54888.png)

---

<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:** [November 20, 2017, 3:28am UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/17 "2017-11-20T03:28:04Z")

</div>

Hmm I wonder if has to do with the LATIN1 encoding vs UTF8. Have you tried to manually create the database using the command above ?

---

<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:** [November 20, 2017, 3:36am UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/18 "2017-11-20T03:36:03Z")

</div>

Perhaps some of the suggestions on this stackoverflow post might help - [https://stackoverflow.com/questions/20815440/force-postgres-to-install-with-utf8-encoding-not-latin1](https://stackoverflow.com/questions/20815440/force-postgres-to-install-with-utf8-encoding-not-latin1)

---

<div class="post-metadata">

**Author:** ![banad60](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@banad60](https://discourse.libretime.org/u/banad60)\
**Post date:** [April 27, 2019, 9:03am UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/19 "2019-04-27T09:03:10Z")

</div>

psql: FATAL: database “airtime” does not exist

postgres=# \l  
List of databases  
Name | Owner | Encoding | Collate | Ctype | Access privileges  
-----------±---------±---------±------------±------------±----------------------  
postgres | postgres | UTF8 | de\_DE.UTF-8 | de\_DE.UTF-8 |  
template0 | postgres | UTF8 | de\_DE.UTF-8 | de\_DE.UTF-8 | =c/postgres +  
| | | | | postgres=CTc/postgres  
template1 | postgres | UTF8 | de\_DE.UTF-8 | de\_DE.UTF-8 | =c/postgres +  
| | | | | postgres=CTc/postgres  
(3 rows)

wtf! now we have end of april 2019 an this bug is still present in ubuntu 18.04. is nobody out there, who is able to release a proper installation-script for libretime? since years the same problems, this may be a way people turning off libretime instead working on or with it, but at this state it is realy unusable for me, because my lifetime is limited.

---

<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:** [April 27, 2019, 11:22am UTC](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53/20 "2019-04-27T11:22:26Z")

</div>

So the install script works for the vast majority of cases that we are aware of and the only way we can fix it when there is a problem is for people to provide detailed information about their setup and hints as to what went wrong.

So evidently you did not have a database created during your installation process. And this “bug” but you provide no more details or logs of what happened when you ran your installation script. So if we are going to assume this is a bug we need more details.

Are you running this on a VPS, or a bare metal server.  
Have you tried running `sudo ./install -fiap` to avoid all of the prompts. It’s possible that the script didn’t create the database for some reason but without a log of what happened with the install script it is impossible to guess.

I’d recommend running the above command and if it works then great, and if it doesn’t and you want assistance then try and share some more information.

I understand frustration but considering this is a free software project developed mostly by volunteers the attitude is a little bit annoying, especially when most people don’t run into this issue as far as I know. We are also happy to fix it if we can figure out what went wrong but you are not providing enough information for us to troubleshoot.

[Next page](https://discourse.libretime.org/t/there-was-an-error-creating-the-database/53.md?page=2)
