[SOLVED] LC_CTYPE: cannot change locale (UTF-8): No such file or directory

I was trying to SSH my CentOS 6.5 and i got this error:
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
then i directly goto that system and run update command and got this error:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

I tried so many commands, but non of them works for me, finally i got this solution and guess what it’s works!
Open “/etc/environment” file and add two lines given below. Thats it!

Save and exit from file, now try to connect via SSH or use “yum update” command. I hope it will work for you also.

About the author

Ishtiyaq Husain

Ishtiyaq Husain is a Software Engineer and founder of Lessons4you.info. He has been in the field nearly 10+ years, and have been loving every minute of it. He is a Blogger, YouTuber, Developer, Thinker, and Photographer.