zoukankan      html  css  js  c++  java
  • 【云计算】Docker 镜像如何设置语言环境?bash: warning: setlocale: LC_ALL: cannot change locale (en_US)

    解决方案:

    # set default language environment
    RUN locale-gen en_US.UTF-8 
        && dpkg-reconfigure locales
    ENV LC_ALL=en_US.UTF-8
    ENV LANG=en_US.UTF-8
    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

  • 相关阅读:
    常见HTTP状态码
    Spring MVC 原理小结
    RESTful API
    java:IO流学习小结
    理解 Statement 和 PreparedStatement
    Hibernate缓存原理与策略
    APP运营
    网站常见术语
    php常见术语
    运维------术语名词
  • 原文地址:https://www.cnblogs.com/junneyang/p/5305071.html
Copyright © 2011-2022 走看看