Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

update-locale failure for Raspbian Jessie (Debian) #23

Open
lashower opened this issue Aug 9, 2017 · 1 comment
Open

update-locale failure for Raspbian Jessie (Debian) #23

lashower opened this issue Aug 9, 2017 · 1 comment

Comments

@lashower
Copy link

lashower commented Aug 9, 2017

Cookbook version

2.0.1

Chef-client version

chef-client --version
Chef: 13.2.20

Platform Details

cat /etc/*-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian

Scenario:

Running locale on newly formatted Raspberry Pi.
Command "update-locale LANG=#{lang} LC_ALL=#{lc_all}" fails with:
*** update-locale: Error: invalid locale settings: LC_ALL=en_US.UTF-8 LANG=en_GB.UTF-8

Steps to Reproduce:

You can easily reproduce this by running this command on a fresh Raspberry Pi running Raspbian Jessie:
update-locale LANG=en_US.utf8 LC_ALL=en_US.utf8

Expected Result:

I expect locale -a to return this after execution:
LANG=en_US.utf8
LANGUAGE=
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8

Actual Result:

Fails with this error on line 31:
*** update-locale: Error: invalid locale settings: LC_ALL=en_US.UTF-8 LANG=en_GB.UTF-8

Quick Fix:

    template '/etc/locale.gen' do
      source 'locale.gen.erb'
    end
    execute "Updating Locales" do
      command "locale-gen en_US.UTF-8"
    end

See attached locale.txt = locale.gen.erb
locale.txt

@chewi
Copy link

chewi commented Jan 17, 2018

This is the same as #21.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants