Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@seguri

This comment has been minimized.

Copy link

commented Oct 4, 2016

In my case: put LC_ALL before LC_CTYPE

@wmandai

This comment has been minimized.

Copy link

commented Oct 26, 2016

Thanks for sharing 👍

@vinamelody

This comment has been minimized.

Copy link

commented Nov 3, 2016

Should add 1 more step: reboot

@LiboDing

This comment has been minimized.

Copy link

commented Nov 3, 2016

Yes, it works for me, no need to reboot, thanks for sharing!

@B0J1

This comment has been minimized.

Copy link

commented Nov 20, 2016

Thanks!!

@jagdeepsingh

This comment has been minimized.

Copy link

commented Nov 28, 2016

+1

@kevinkl3

This comment has been minimized.

Copy link

commented Jan 7, 2017

Thanks +1

@membphis

This comment has been minimized.

Copy link

commented Jan 17, 2017

Thanks +1

@kaungmyatsoe

This comment has been minimized.

Copy link

commented Jan 17, 2017

Thanks

@samma89

This comment has been minimized.

Copy link

commented Jan 29, 2017

+1 Thanks.

@PENGZhaoqing

This comment has been minimized.

Copy link

commented Feb 10, 2017

Thanks

@23Pstars

This comment has been minimized.

Copy link

commented Feb 13, 2017

+1

@hannemario

This comment has been minimized.

Copy link

commented Mar 6, 2017

+1

@adieuadieu

This comment has been minimized.

Copy link

commented Mar 11, 2017

Cheers for this.

@pilhoon

This comment has been minimized.

Copy link

commented Mar 20, 2017

+1

@hugotavares

This comment has been minimized.

Copy link

commented Oct 11, 2017

+1

@ZhukV

This comment has been minimized.

Copy link

commented Nov 4, 2017

+1

@ibnusulaiman83

This comment has been minimized.

Copy link

commented Nov 12, 2017

share my solutions for Centos 7

sudo nano /etc/environment

LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"

Ctrl + X > Yes >Enter

sudo reboot

@princealikhan

This comment has been minimized.

Copy link

commented Feb 22, 2018

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.