fgrehm/vagrant-lxc — pull request #201 by abevoelker (2014-01-04 22:26:33+00:00)
Title: Fix broken locale in Ubuntu boxes

When trying to install Postgres on a freshly-built Ubuntu Precise 64-bit box, it was blowing up due to locale errors. It appears that the locale is broken:

```
$ vagrant ssh
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.8.0-32-generic x86_64)

* Documentation: https://help.ubuntu.com/

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

vagrant@precise-base:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
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=
```

When reading the build script output [before the fix](https://gist.github.com/abevoelker/8261510#file-before-locale-fix-txt), it does mention locale errors. [After the fix](https://gist.github.com/abevoelker/8261510#file-after-locale-fix-txt), the locale errors are gone.

I'm not sure if it's a proper fix or not but worked for me.