Install Error - Locales [fixed]
  • Hey Everyone ..

    I have been trying to install airtime and i am getting this weird error - 

    Im on Ubuntu 11.04. I did what the error told me to do, and now i am stumped.

    If someone could help me out, it would be much appreciated. 

    Even if i have to pay for someones expertise. I just want it working :)





    * Making sure /etc/default/locale is set properly
     * Fail

    A non UTF-8 default locale found in /etc/default/locale. Airtime requires
    a UTF-8 locale to run. To fix this please do the following:

    Ubuntu:
    Put line 'en_US.UTF-8 UTF-8' (or similar) without quotes to '/var/lib/locales/supported.d/local', 
    replacing any existing lines.
    A list of supported locales is available in '/usr/share/i18n/SUPPORTED'
    Then run 'sudo dpkg-reconfigure locales'

    Debian:
    Run 'sudo dpkg-reconfigure locales' and use the interface to select 'en_US.UTF-8 UTF-8' (or similar).
    On the second page select this new locale as the default.

    After these changes have been made simply run install again.

    Now exiting install...

    dpkg: error processing airtime (--configure):
     subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
     airtime
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Post edited by Olly Johnston at 2012-08-18 21:27:40
  • 15 Comments sorted by
  • Ok so you should be fine running those commands the terminal
    Airtime Pro Hosting: http://airtime.pro
  • Mike,
    after changing default system locale, to make it effective, you must
    logout and then login back to the shell, than make sure that locale is
    updated with command locale.

    Then follow Martin instructions to reinstall postgres - if that still
    does not work, try the hard way:
    http://jacobian.org/writing/pg-encoding-ubuntu/

    suggeritamente,
    Francesco P.


    Post edited by FrancescoP at 2012-08-28 06:09:57
  • Hey Guys, that error has seemed to go away, however i am geting this one now...

       ---Applying Patches for mutagen---
    patching file site-packages/mutagen/mp3.py
    Hunk #1 succeeded at 205 (offset -4 lines).
    patching file site-packages/mutagen/mp3.py
    Hunk #2 succeeded at 169 (offset -4 lines).
    * Checking for user pypo
     * Creating user pypo
    * Creating INI files
    * Initializing INI files
    * Airtime Version: 2.1.3
    * Storage directory setup
    * Skipping directory already exists: /srv/airtime/stor
    * Giving Apache permission to access /srv/airtime/stor
    * Skipping directory already exists: /srv/airtime/stor/organize
    * Giving Apache permission to access /srv/airtime/stor/organize
    * Checking database for correct encoding
     * Unfortunately your postgresql database has not been created using a UTF-8 encoding.
     * As of Airtime 2.1, installs will fail unless the encoding has been set to UTF-8. Please verify this is the case
     * and try the install again
    There was an error during install. Exit code 1
    dpkg: error processing airtime (--configure):
     subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
     airtime
    E: Sub-process /usr/bin/dpkg returned an error code (1)
  • Please try the following:

    sudo -u postgres psql -l

    If under the name column you only see "postgres, template0, template1 and airtime" then please run the following two commands:

    sudo apt-get purge postgresql
    sudo apt-get install postgresql

    Otherwise, post the names you see in the column.
    Airtime Pro Hosting: http://airtime.pro
  • I only see three tables, the first three in your list. It doesn't show airtime.
  • I still get the same.
    I've had a look at the encoding of the sql and it seems that it is running in ASCII mode
    sudo -u postgres psql -c "SHOW SERVER_ENCODING"
    root@server2:~# sudo -u postgres psql -c "SHOW SERVER_ENCODING"
    could not change directory to "/root"
     server_encoding
    -----------------
     SQL_ASCII
    (1 row)

    I've tried generating the locales again too.
    root@server2:~# dpkg-reconfigure locales
    Generating locales...
      en_US.UTF-8... up-to-date
    Generation complete.

  • I've also restarted by the way.
    I shall now re-install the system, change locales and then restart before commencing the install procedure again.
  • Getting a new error with psql

     * Unfortunately your postgresql database has not been created using a UTF-8 encoding.
     * As of Airtime 2.1, installs will fail unless the encoding has been set to UTF-8. Please verify this is the case
     * and try the install again
    There was an error during install. Exit code 1
    dpkg: error processing airtime (--configure):
     subprocess installed post-installation script returned error exit status 1
    configured to not write apport reports
                                          Errors were encountered while processing:
     airtime
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    root@server2:~# sudo -u postgres psql -l
    could not change directory to "/root"
    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"?

  • Try this: 

    sudo apt-get purge postgresql
    sudo apt-get install postgresql

    This basically reinstalls postgresql with the new locale settings which means the new database will also be UTF-8 encoded.
    Airtime Pro Hosting: http://airtime.pro
  • I set the locales, re-installed psql using your method and then installed airtime. Still get the same problem.
    Also, why is SFTP disabled when I install airtime?
  • root@server2:~# sudo -u postgres psql -l
    could not change directory to "/root"
    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"?

    I get this error once I re-install.
  • really this driving me nutsss!
    trying to install but seems no matter what i come up with the install keeps breaking with:

    * Checking database for correct encoding
     * Unfortunately your postgresql database has not been created using a UTF-8 encoding.
     * As of Airtime 2.1, installs will fail unless the encoding has been set to UTF-8. Please verify this is the case
     * and try the install again

    PLEASE HELP! this is really driving me nuts!!!
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    desintall and reinstall postgresql
  • I did all the solutions given I removed and reinstalled postgresql and every thing else, reloaded the server and it is not working!!! still the same error everytime on both ubuntu and debian. :(

    Unfortunately your postgresql database has not been created using a UTF-8 encoding.
     * As of Airtime 2.1, installs will fail unless the encoding has been set to UTF-8. Please verify this is the case
     * and try the install again
    There was an error during install. Exit code 1
    dpkg: error processing airtime (--configure):
     subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
     airtime
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  • just found the solution!!!!
    you have to do this before installing everything:
    sudo locale-gen en_GB.UTF-8
    sudo update-locale LANG=en_GB.UTF-8

    then:

    nano /var/lib/locales/supported.d/local

    add thes lines:
    ru_RU.UTF-8 UTF-8
    en_GB.UTF-8 UTF-8
    en_US.UTF-8 UTF-8

    then:
    sudo dpkg-reconfigure locales


    now reboot and start the installation , remember you have to do this before postgresql!!!