Debian(Ubuntu) 初始化配置

0.1. 更新系统文件

1
2
apt update;
apt upgrade;

0.2. LC_ALL: cannot change locale 错误

Ubuntu 和 Debian 都会出这个问题:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Last login: Fri Aug  9 11:31:59 2019 from xxxxxxx
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[email protected]:~# locale
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_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

set-locale-error

错误中已经列出了解决办法:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Sep 16 14:46:07 2019
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
_____________________________________________________________________
WARNING! Your environment specifies an invalid locale.
The unknown environment variables are:
LC_CTYPE=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_ALL=en_US.UTF-8
This can affect your user experience significantly, including the
ability to manage packages. You may install the locales by running:

sudo dpkg-reconfigure locales

and select the missing language. Alternatively, you can install the
locales-all package:

sudo apt-get install locales-all

To disable this message for all users, run:
sudo touch /var/lib/cloud/instance/locale-check.skip
_____________________________________________________________________
Just for my love !!