加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

ubuntu – 无法找到package language-pack-en

发布时间:2020-12-16 03:44:42 所属栏目:安全 来源:网络整理
导读:在我的NodeJS服务器上(作为docker镜像运行) Dockerfile FROM node:4.8-slimRUN apt-get update -y apt-get install -yqq locales git 没有安装英语语言环境: RUN locale -a 给我 CC.UTF-8POSIX 在我的dockerfile中,我尝试添加缺少的语言 RUN apt-get inst

在我的NodeJS服务器上(作为docker镜像运行)…

Dockerfile

FROM node:4.8-slim
RUN apt-get update -y && 
    apt-get install -yqq locales git

…没有安装英语语言环境:

RUN locale -a

给我

C
C.UTF-8
POSIX

在我的dockerfile中,我尝试添加缺少的语言

RUN apt-get install -y language-pack-en

但这给了我

Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package language-pack-en

那么如何添加缺少的语言包呢?

更新

运用

sudo locale-gen en_US
sudo locale-gen en_US.UTF-8
sudo update-locale 

给我这个错误:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:en",LC_ALL = "en_US.UTF-8",LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to 

默认语言环境:没有这样的文件或目录

如果它是debian映像,则可以在Dockerfile中添加以下内容

RUN apt-get install -y locales locales-all
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读