解决方案:

# set default language environment
RUN locale-gen en_US.UTF- \
&& dpkg-reconfigure locales
ENV LC_ALL=en_US.UTF-
ENV LANG=en_US.UTF-
ENV LANGUAGE=en_US.UTF-8 OR:
sudo locale-gen en_US.UTF-8

sudo dpkg-reconfigure locales
vi /etc/default/locale
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
重新登录服务器,warning 警告不再出现,问题解决
 

 

参考资料:

1、bash: warning: setlocale: LC_ALL: cannot change locale (en_US):

http://blog.163.com/fl_xiang/blog/static/194634512201291231429799/

https://www.xdty.org/912

https://blogs.oracle.com/sakshijain/entry/the_problem_of_setting_locale

http://www.cnblogs.com/ifantastic/p/4565822.html

http://www.tuicool.com/articles/qYrIvm/

2、How to source /etc/profile and save it in docker?

http://stackoverflow.com/questions/31216780/how-to-source-etc-profile-and-save-it-in-docker

3、sudo命令报错

http://www.cnblogs.com/wangkongming/p/4451629.html

【云计算】Docker 镜像如何设置语言环境?bash: warning: setlocale: LC_ALL: cannot change locale (en_US)的更多相关文章

  1. bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

    bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) Q: hubery@roaster:~$ locale loc ...

  2. [Ubuntu] bash: warning: setlocale: LC_ALL: cannot change locale

    问题症状 -bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8) 解决方法 本地化是指不同地区用户在键盘上输入不同语言 ...

  3. docker本地化异常:/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

    docker中经常设置不了 环境变量$LC_ALL,  导致报很多奇怪的编码错误: /bin/sh: warning: setlocale: LC_ALL: cannot change locale ...

  4. -bash: warning: setlocale: LC_CTYPE: cannot change locale (EN_US.UTF-8): No such file or directory

    出问题原因: 通过 su - 切换用户时候,LANG设置为en或者设置错误,切换角色会出现这个错误 如何解决? echo $LANG # 查看 LANG 参数 sed 's#LANG=en#LANG= ...

  5. 关于 /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en.US_UTF-8) 问题

    亲测可行 中文 # vim /etc/profile.d/locale.sh export LC_CTYPE=zh_CN.UTF-8 export LC_ALL=zh_CN.UTF-8 # vim / ...

  6. -bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_US.UTF-8): No such file or directory -bash: warning: setlocale: LC_COLLATE:

    前几天登录服务器发现出现了这些个警告,一直没时间去处理他,今天难得有空,处理一下并记录下来,希望可以帮助到有需要的朋友. 警告信息如下: Last :: from 10.0.0.1 -bash: wa ...

  7. -bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8mb4): No such file or directory

    前几天登录服务器发现出现了这些个警告,一直没时间去处理他,今天难得有空,处理一下并记录下来,希望可以帮助到有需要的朋友. 警告信息如下: Last login: Tue May :: from 192 ...

  8. MacOs -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

    1解决iterm远程登录主机报错 -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or ...

  9. -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

    本人使用mac系统,命令行工具使用的iterm2,登录自己的云主机的时候 每次都要提示如下错误 -bash: warning: setlocale: LC_CTYPE: cannot change l ...

随机推荐

  1. 湖南大学ACM程序设计新生杯大赛(同步赛)C - Do you like Banana ?

    题目描述 Two endpoints of two line segments on a plane are given to determine whether the two segments a ...

  2. 长安大学第四届ACM-ICPC“迎新杯”程序设计竞赛-重现赛 F - 打铁的箱子

    题目描述 作为彩虹岛上最擅长打铁的人,

  3. linux下安装Python3.4.1

    1.下载linux 版本的 Python 我是在Windows下下载的,然后共享到linux下. 2.解压文件 tar -xvf Python-3.4.1.tar x是解压 v是查看所有过程 f是使用 ...

  4. BeanFactoryAware和BeanNameAware

    实现 BeanFactoryAware 接口的 bean 可以直接访问 Spring 容器,被容器创建以后,它会拥有一个指向 Spring 容器的引用. BeanFactoryAware 接口只有一个 ...

  5. 【LeetCode】shell

    195. Tenth Line 输出file.txt中的第十行 答案: # Read from the file file.txt and output the tenth line to stdou ...

  6. Nearest Neighbor Search

    ## Nearest Neighbor Search ## Input file: standard input Output file: standard output Time limit: 1 ...

  7. Java并发(十四):并发工具类——CountDownLatch

    先做总结: 1.CountDownLatch 是什么? CountDownLatch 允许一个或多个线程等待其他线程(不一定是线程,某个操作)完成之后再执行. CountDownLatch的构造函数接 ...

  8. ZOJ 3256 Tour in the Castle 插头DP 矩阵乘法

    题解 这题是一道非常好的插头题,与一般的按格转移的题目不同,由于m很大,要矩阵乘法,这题需要你做一个按列转移的插头DP. 按列转移多少与按格转移不同,但大体上还是基于连通性进行转移.每一列只有右插头是 ...

  9. svm算法介绍

    在一个理想的分类当中,我们想要用一个超平面来将正类样本和负类样本划分开来.这个超平面的方程为 $\mathbf{w}^T\mathbf{x}+b=0$ 我们希望这个超平面能够使得划分更加的鲁棒,在图形 ...

  10. PAT甲级1017. Queueing at Bank

    PAT甲级1017. Queueing at Bank 题意: 假设一家银行有K台开放服务.窗前有一条黄线,将等候区分为两部分.所有的客户都必须在黄线后面排队,直到他/她轮到服务,并有一个可用的窗口. ...