You are not logged in.

#1 2017-09-02 01:13:57

rhtayang
Member
Registered: 2017-09-02
Posts: 5

Create a snapshot error “Failed to set locale. Fix your system.”

I use the btrfs file system and want to create a snapshot like this

sudo snapper -c config create --description desc
Failed to set locale. Fix your system.


my locale

$ 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=zh_CN.US-ASCII
LC_CTYPE=zh_CN.US-ASCII
LC_NUMERIC=zh_CN.US-ASCII
LC_TIME=zh_CN.US-ASCII
LC_COLLATE=zh_CN.US-ASCII
LC_MONETARY=zh_CN.US-ASCII
LC_MESSAGES="zh_CN.US-ASCII"
LC_PAPER="zh_CN.US-ASCII"
LC_NAME="zh_CN.US-ASCII"
LC_ADDRESS="zh_CN.US-ASCII"
LC_TELEPHONE="zh_CN.US-ASCII"
LC_MEASUREMENT=zh_CN.US-ASCII
LC_IDENTIFICATION="zh_CN.US-ASCII"
LC_ALL=

Offline

#2 2017-09-02 01:15:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Create a snapshot error “Failed to set locale. Fix your system.”

How did you set your locale? Please include exact steps.


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-09-02 01:25:59

rhtayang
Member
Registered: 2017-09-02
Posts: 5

Re: Create a snapshot error “Failed to set locale. Fix your system.”

i uncomment en_US.UTF-8 UTF-8 and zh_CN.UTF-8 UTF-8 in /etc/locale.gen
then locale-gen

Offline

#4 2017-09-02 01:26:57

rhtayang
Member
Registered: 2017-09-02
Posts: 5

Re: Create a snapshot error “Failed to set locale. Fix your system.”

jasonwryan wrote:

How did you set your locale? Please include exact steps.


Moving to NC...

i uncomment en_US.UTF-8 UTF-8 and zh_CN.UTF-8 UTF-8 in /etc/locale.gen
then locale-gen

Offline

#5 2017-09-02 01:35:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Create a snapshot error “Failed to set locale. Fix your system.”


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2017-09-02 01:44:04

rhtayang
Member
Registered: 2017-09-02
Posts: 5

Re: Create a snapshot error “Failed to set locale. Fix your system.”

I set /etc/locale.conf like this
# echo 'LANG=zh_CN.UTF-8'  > /etc/locale.conf

But it doesn't work

Offline

#7 2017-09-02 02:22:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Create a snapshot error “Failed to set locale. Fix your system.”

How did you install Arch?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2017-09-02 02:51:16

rhtayang
Member
Registered: 2017-09-02
Posts: 5

Re: Create a snapshot error “Failed to set locale. Fix your system.”

jasonwryan wrote:

How did you install Arch?

I installed it in the steps of Wiki
What can I do to initialize locale?

Offline

#9 2017-09-02 06:37:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,877

Re: Create a snapshot error “Failed to set locale. Fix your system.”

However you actually installed arch, you somehow export some LC or LANG variable to the invalid code "zh_CN.US-ASCII"
If you installed arch yourself using the wiki, you should recall how this happened. Otherwise grep your filesystem for the string.

Offline

Board footer

Powered by FluxBB