Airtime installation Error : Non UTF locale
  • I'm unable to install airtime on my Ubuntu 12.04.1 Desktop installation.

    Here's is the terminal paste of the whole process http://pastebin.com/hHv3hg2d
    Post edited by Varun Yellina at 2012-11-23 16:33:32
  • 28 Comments sorted by
  • Its a fresh install of 12.04.1

    Here's what I did:
    Installed airtime-easy-setup with USC
    sudo apt-get update && sudo apt-get install airtime


    and this is what it returns


    * Checking for user pypo
     * Creating user pypo
    * Creating INI files
    * Initializing INI files
    * Airtime Version: 2.2.0
    * Storage directory setup
    * Skipping directory already exists: /home/strawmetal/airtime/storage
    * Giving Apache permission to access /home/strawmetal/airtime/storage
    * Skipping directory already exists: /home/strawmetal/airtime/storage/organize
    * Giving Apache permission to access /home/strawmetal/airtime/storage/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)


    We already purged and installed postgresql after setting locale with UTF-8; didn't we?
    Post edited by Varun Yellina at 2012-11-24 16:34:46
  • Here's what I did:

    sudo apt-get --purge remove postgresql\*
    sudo rm -r /etc/postgresql/
    sudo rm -r /etc/postgresql-common/
    sudo rm -r /var/lib/postgresql/
    sudo userdel -r postgres
    sudo groupdel postgres
    Installed airtime-easy-setup via USC
    sudo apt-get update && sudo apt-get install airtime



    And what do you know. Voila! its working!

    NOTE: I forgot
    sudo apt-get install postgresql
    but actually it worked without this...
    Post edited by Varun Yellina at 2012-11-25 13:30:52
  • Did you try the steps outputted?

    1. A non UTF-8 default locale found in /etc/default/locale. Airtime requires
    2. a UTF-8 locale to run. To fix this please do the following:
    3.  
    4. Ubuntu:
    5. Put line 'en_US.UTF-8 UTF-8' (or similar) without quotes to '/var/lib/locales/supported.d/local',
    6. replacing any existing lines.
    7. A list of supported locales is available in '/usr/share/i18n/SUPPORTED'
    8. Then run 'sudo dpkg-reconfigure locales'
    Airtime Pro Hosting: http://airtime.pro
  • Yes i've already done that. You can see those lines in the pastebin paste i've linked. I've also given the cat output of the locale.
  • strawmetal@vaio:~$ sudo gedit /var/lib/locales/supported.d/local
    strawmetal@vaio:~$ sudo dpkg-reconfigure locales
    Generating locales...
      en_AG.UTF-8... done
      en_AU.UTF-8... done
      en_BW.UTF-8... done
      en_CA.UTF-8... done
      en_DK.UTF-8... done
      en_GB.UTF-8... done
      en_HK.UTF-8... done
      en_IE.UTF-8... done
      en_IN.UTF-8... done
      en_NG.UTF-8... done
      en_NZ.UTF-8... done
      en_PH.UTF-8... done
      en_SG.UTF-8... done
      en_US.UTF-8... up-to-date
      en_ZA.UTF-8... done
      en_ZM.UTF-8... done
      en_ZW.UTF-8... done
    Generation complete.
    strawmetal@vaio:~$ sudo apt-get install airtime
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    airtime is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
    1 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Setting up airtime (2.2.0-2) ...
    Site airtime-vhost disabled.
    To activate the new configuration, you need to run:
      service apache2 reload
    Setting up apache2...
    Enabling site airtime-vhost.
    To activate the new configuration, you need to run:
      service apache2 reload
    Module rewrite already enabled
    Site default already disabled
    Configuring php5...
    Setting up icecast2...
    Restarting icecast2: Starting icecast2
    Detaching from the console
    icecast2.
    Setting up monit configuration...
     * Stopping daemon monitor monit                        
                                                                           
                                                                           
                          [ OK ]
     * Starting daemon monitor monit                        
                                                                           
                                                                           
                          [ OK ]
     * Restarting web server apache2                        
                                                                           
                                                                           
                                 apache2: Could not reliably determine the
    server's fully qualified domain name, using 127.0.1.1 for ServerName
     ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                           
                                                                           
                                                                           
                           [ OK ]
    Liquidsoap symlink points to the right place!
    * 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)
    strawmetal@vaio:~$ cat /var/lib/locales/supported.d/local
    en_US.UTF-8 UTF-8
    strawmetal@vaio:~$ uname -a
    Linux vaio 3.2.0-33-generic #52-Ubuntu SMP Thu Oct 18 16:29:15 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
    strawmetal@vaio:~$
    Post edited by Varun Yellina at 2012-11-23 16:40:01
  • Please post the output of

    less /etc/default/locale
    Airtime Pro Hosting: http://airtime.pro
  • LANG="en_IN"
    LANGUAGE="en_IN:en"

  • It appears those instructions don't work as of Ubuntu 12.04 (just verified locally).

    Please run the following as an alternate solution:

    locale | grep LANG | sudo tee /etc/default/locale
    Airtime Pro Hosting: http://airtime.pro
  • strawmetal@vaio:~$ locale | grep LANG | sudo tee /etc/default/locale
    [sudo] password for strawmetal:
    LANG=en_IN
    LANGUAGE=en_IN:en
    strawmetal@vaio:~$



    What do I do now?
  • My apologies, I had assumed that the output of "locale" would be UTF-8 at this point.

    Reading the following document:

    It appears that you will need to update this file manually. Change it so that it looks as follows:

    LANG=en_IN.UTF-8
    LANGUAGE=en_IN:en 


    Then open a new terminal, and ensure that LANG=en_IN.UTF-8 is present (if not you may need to restart the system).

    After this, try installing. You may still have a problem with postgresql during the Airtime installation, but let's take this one step at a time.

    Airtime Pro Hosting: http://airtime.pro
  • Restarted and tried installing again. As you mentioned postgresql failed.

    * 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)
    strawmetal@vaio:~$

  • Ok, so when postgresql was installed, it was installed under non UTF-8 environment, meaning it created a non-UTF-8 database.

    To fix this we simply need to reinstall postgresql under the new environment you just set up. Please do

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

    This should be the final step.
    Airtime Pro Hosting: http://airtime.pro
  • Followed both.

    The following NEW packages will be installed:
      postgresql
    0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
    Need to get 0 B/5,552 B of archives.
    After this operation, 64.5 kB of additional disk space will be used.
    Selecting previously unselected package postgresql.
    (Reading database ... 207874 files and directories currently installed.)
    Unpacking postgresql (from .../postgresql_9.1+129ubuntu1_all.deb) ...
    Setting up postgresql (9.1+129ubuntu1) ...
    strawmetal@vaio:~$ sudo apt-get install airtime
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    E: Unable to locate package airtime
    strawmetal@vaio:~$


    What next?
    Post edited by Varun Yellina at 2012-11-23 17:55:53
  • did you remove the airtime easy install package?
    Airtime Pro Hosting: http://airtime.pro
  • purge postgresql removed airtime-easy-install..
  • Just reinstall that package and then do 

    sudo apt-get install airtime 
    Airtime Pro Hosting: http://airtime.pro
  • We're looking into make this process less of a pain for users who have a non-UTF-8 locale by default. Was your system a fresh install of 12.04 or was it upgraded from previous versions of Ubuntu? I'm curious why Ubuntu 12.04 would not install a UTF-8 locale, which is standard nowadays.

    Airtime Pro Hosting: http://airtime.pro
  • OK it appears that a purge doesn't complete remove all Postgresql files as it should.

    Please do a purge again, and additionally follow the steps outlined here:


    These instructions were reported by one of our users as the solution to the problem. See this thread:

    Airtime Pro Hosting: http://airtime.pro
  • I'm wading through this same mess...
    Airtime 2.2.1
    Starting point: VPS with fresh install of Ubuntu 32-bit 12.04

    After struggling with it for a while, and removing postgress (because it was created with non UTF-8), I have arrived at this point:

    Setting defaults for non-interactive installation...
    *** update-locale: Error: invalid locale settings:  LANGUAGE=en_IN:en LANG=en_IN.UTF-8
    dpkg: error processing airtime-easy-setup (--install):
     subprocess installed post-installation script returned error exit status 255
    Errors were encountered while processing:
     airtime-easy-setup

    The locale settings exactly match the above... what did I do wrong?
    Post edited by Rex Latchford at 2012-12-21 13:51:18
  • Reply to @Rex+Latchford:

    Are those two key/values on the same line? They should be on separate lines like so:

    LANGUAGE=en_IN:en
    LANG=en_IN.UTF-8 

    You could post the contents of /etc/default/locale so we can verify this.
    Airtime Pro Hosting: http://airtime.pro
  • FYI they were _exactly_ as above, and it didn't work. In fact, an attempt to reinstall liquidsoap caused a bunch of locale related complaints. After copying /etc/default/locale from another machine that has XUbuntu 12.04LTE on it, (and was able to install ok) I got further down the road.

    The "successful" content of /etc/default/locale was:

    root@machine:/# cat /etc/default/locale
    LANG=en_US.UTF-8
    #LANGUAGE=en_US:en
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    root@machine:/#

    After that change, the airtime install progressed until I hit this helpful message!

    * 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)

    So now to attempt re-purging postgres...
     
  • After you follow Varun's steps here:


    You should be up and running.
    Airtime Pro Hosting: http://airtime.pro
  • I followed the steps again shown above in this thread per Varun Yellina 11/25.

    Then I ran the easy setup again using gdebi.

    This time I got:

    Setting up postgresql (9.1+129ubuntu1) ...
    Selecting previously unselected package airtime-easy-setup.
    (Reading database ... 67607 files and directories currently installed.)
    Unpacking airtime-easy-setup (from airtime-easy-setup.deb) ...
    Setting up airtime-easy-setup (2.2.1-1) ...
    Installing Sourcefabric package signing key...
    OK
    Setting up Airtime for America/Denver timezone...
    Setting Icecast and Airtime domain names to creek...
    Setting defaults for non-interactive installation...
    en_US.UTF-8 is the default locale on this server and appears to support UTF-8 encoding.

     Now please run the commands:

       sudo apt-get update
       sudo apt-get install airtime

     After that, installation of Airtime should be complete in a couple of minutes.
    I followed the update and install steps quoted above.

    It appeared to complete.

    I noticed the command "airtime-check-system" and FYI it reported:

    root@machine# airtime-check-system
    AIRTIME_STATUS_URL             = http://localhost:80/api/status/format/json/api_key/%%api_key%%
    AIRTIME_SERVER_RESPONDING      = OK
    KERNEL_VERSION                 = 2.6.32-308.8.2.el5.028stab101.1
    MACHINE_ARCHITECTURE           = i686
    TOTAL_MEMORY_MBYTES            = 1048576
    TOTAL_SWAP_MBYTES              = 0
    AIRTIME_VERSION                = 2.2.1
    OS                             = Ubuntu 12.04.1 LTS i686
    CPU                            = Intel(R) Xeon(R) CPU E31270 @ 3.40GHz
    WEB_SERVER                     = Apache/2.2.22 (Ubuntu)
    PLAYOUT_ENGINE_PROCESS_ID      = 24159
    PLAYOUT_ENGINE_RUNNING_SECONDS = 43
    PLAYOUT_ENGINE_MEM_PERC        = 0.9%
    PLAYOUT_ENGINE_CPU_PERC        = 0.0%
    LIQUIDSOAP_PROCESS_ID          = 24191
    LIQUIDSOAP_RUNNING_SECONDS     = 43
    LIQUIDSOAP_MEM_PERC            = 1.3%
    LIQUIDSOAP_CPU_PERC            = 1.4%
    MEDIA_MONITOR_PROCESS_ID       = 24110
    MEDIA_MONITOR_RUNNING_SECONDS  = 43
    MEDIA_MONITOR_MEM_PERC         = 1.0%
    MEDIA_MONITOR_CPU_PERC         = 0.4%
    RABBITMQ_PROCESS_ID            = 1361
    RABBITMQ_RUNNING_SECONDS       = 529004
    RABBITMQ_MEM_PERC              = 1.7%
    RABBITMQ_CPU_PERC              = 0.0%
    -- Your installation of Airtime looks OK!

    I checked the /etc/icecast.xml file. I had a relay running, and I wanted to see if the config was changed.
    I diffed the files, and found that AirTime only changed the following:

    <         <source-password>donthackme</source-password>
    <         <relay-password>donthackme</relay-password>
    <         <admin-password>donthackme</admin-password>
    <     <hostname>non-FQDN-hostname</hostname>

    When I originally started the install, I did not have an FQDN for the machine... the machine name got changed back to the local name as you see above.

    Otherwise, the icecast.xml file with my customizations was intact!

    I was able to validate the rest.. so the install was successful.

    Thanks to

    Varun Yellina and Martin Konecny for the above thread.

  • I just ran into this with a fresh install of 12.04 64bit from the OpenVZ repo current as of this date:

    /etc/default/locale contained:
    cat /etc/default/locale
    #  File generated by update-locale
    root@airplay:~#
    I added the line:
    LANG="en_US.UTF-8"
    I got:
    Checking that the server has a UTF-8 locale...
    *** update-locale: Error: invalid locale settings:  LANG="en_US.UTF-8"
    dpkg: error processing airtime-easy-setup (--install):
     subprocess installed post-installation script returned error exit status 255
    Processing triggers for man-db ...
    Errors were encountered while processing:
     airtime-easy-setup
    So, I pasted in the text above from Rex, reloaded the server from scratch, upgraded, and ran airtime-easy-setup again. This time I got:
    Checking that the server has a UTF-8 locale...
    *** update-locale: Error: invalid locale settings:  LC_TELEPHONE="en_US.UTF-8" LC_CTYPE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_ALL= LC_ADDRESS="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_TIME="en_US.UTF-8" LANG=en_US.UTF-8 LC_IDENTIFICATION="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8"
    dpkg: error processing airtime-easy-setup (--install):
     subprocess installed post-installation script returned error exit status 255
    Processing triggers for man-db ...
    Errors were encountered while processing:
     airtime-easy-setup
    Can anyone help? At least I've scripted the whole thing so I can re-roll almost everything automagically except the gdebi command (because easy-setup wants to be attached to a terminal, and
    vzctl exec CTID "gdebi airtime-easy-setup"
    doesn't work for that)...

    Post edited by George Tronic at 2013-03-14 17:49:02
  • I re-examined this thread, and noted  Martin Konecny's post:
    Are those two key/values on the same line? They should be on separate lines like so:

    LANGUAGE=en_IN:en
    LANG=en_IN.UTF-8 
    I gave that a shot, and it didn't work either...
    Checking that the server has a UTF-8 locale...
    *** update-locale: Error: invalid locale settings:  LANGUAGE=en_IN:en LANG=en_IN.UTF-8
    dpkg: error processing airtime-easy-setup (--install):
     subprocess installed post-installation script returned error exit status 255
    Processing triggers for man-db ...
    Errors were encountered while processing:
     airtime-easy-setup




  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    as i said before
    try airtime pro or use a real server
    using a vps is really a bad idea :D
  • Using a vps is a great idea where connectivity is a problem. I have an older instance running as a VPS just fine. The problem here is with installation and "locale" which isn't a VPS related issue.