解决方案:

# 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. 转:Linux创建进程

    转:http://www.cnblogs.com/GT_Andy/archive/2011/06/21/2086129.html 我们都知道,进程就是正在执行的程序.而在Linux中,可以使用一个进程 ...

  2. 洛谷P1552 [APIO2012] 派遣 [左偏树,树形DP]

    题目传送门 忍者 Description 在一个忍者的帮派里,一些忍者们被选中派遣给顾客,然后依据自己的工作获取报偿.在这个帮派里,有一名忍者被称之为 Master.除了 Master以外,每名忍者都 ...

  3. 验证码无法显示:Could not initialize class sun.awt.X11GraphicsEnvironment 解决方案

    一.原因现象:图下图 二.原因导致: 经过Google发现很多人也出现同样的问题.从了解了X11GraphicEnvironment这个类的功能入手,一个Java服务器来处理图片的API基本上是需要运 ...

  4. Jenkins多选项框使用

    多选框的使用场景还是挺多的,比如发布多个服务,或者选择哪些服务器 想要使用多选项,则需要安装插件extend choice parameter,然后在项目中配置参数化构建过程 配置完上面,我们就可以在 ...

  5. 检验Xcode是否被改动过的简单方法,不妨试试!!!

    检验Xcode是否被改动过的简单方法,不妨试试!!!       在终端系统上运行以下命令启用检测: spctl --assess --verbose /Applications/Xcode.app  ...

  6. React Native 系列(二)

    前言 本系列是基于React Native版本号0.44.3写的,最初学习React Native的时候,完全没有接触过React和JS,本文的目的是为了给那些JS和React小白提供一个快速入门,让 ...

  7. Sea Battle<海战>(思路题)

    time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...

  8. python中间件

    django 中的中间件(middleware),在django中,中间件其实就是一个类,在请求到来和结束后,django会根据自己的规则在合适的时机执行中间件中相应的方法. 1.中间件的方法 pro ...

  9. FastReport.Net使用:[10]报表栏目说明

    报表栏目说明 报表标题(Report Title):在每个报表的开始时打印. 报表合计区(Report Summary):在报表结尾时打印,显示在最后一行数据后,页脚前. 页眉(Page Header ...

  10. Hibernate 对象的生命周期及CRUD操作

    对象状态及生命周期 1.Transient(瞬时状态):new的对象为瞬时态 session中没有数据,数据库中没有数据. 2.Persistent(持久状态):被session管理的对象为持久状态, ...