简体   繁体   中英

warning: setlocale: LC_ALL: cannot change locale (C.UTF-8) while using Cloud9 and Openshift

I am using Openshift to host my website/application, and using Cloud 9 as an online IDE to code the website in. Everytime I pushed code to the openshift git repo, or if I SSH'ed into openshift from Cloud9, I kept getting the following error:

warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)

The error would be intermingled with the git command or SSH login completing successfully, so it was more annoying rather than causing issue.

Searched and searched and finally found a solution combining two different approaches. See answer below.

On Cloud9, run the following commands:

sudo locale-gen “en_US.UTF-8”

sudo dpkg-reconfigure locales

Then (still on cloud9), assuming you have already done rhc setup to link to your OpenShift account, do the following:

rhc env-set -a <app_name> LC_ALL=en_US.UTF-8

Then either try a git push, or ssh into openshift, and you should no longer see the errors.

I'm not entirely sure if the sudo locale-gen and dpkg commands actually helped, but I know the moment I got to the rhc env set command it worked and removed the issue.

You should be able to change the locale to something that suits you, but I did not find I needed to for my needs.

Sources:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM