在我的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
默认语言环境:没有这样的文件或目录