我只是嘗試將用戶添加到群組中
$ adduser someuser sudo
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_PAPER = "pl_PL.UTF-8",
LC_ADDRESS = "pl_PL.UTF-8",
LC_MONETARY = "pl_PL.UTF-8",
LC_NUMERIC = "pl_PL.UTF-8",
LC_TELEPHONE = "pl_PL.UTF-8",
LC_IDENTIFICATION = "pl_PL.UTF-8",
LC_MEASUREMENT = "pl_PL.UTF-8",
LC_TIME = "pl_PL.UTF-8",
LC_NAME = "pl_PL.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Adding user `someuser' to group `sudo' ...
Adding user someuser to group sudo
Done.
這是什麼意思,出了什麼問題以及如何消除錯誤?
答案1
您需要注意錯誤訊息並針對缺少的區域設定發出命令。
例如,這是我得到的錯誤:
代碼:
perl: warning: Setting locale failed. perl: warning:
Please check that your locale settings:
LANGUAGE = "en_CA:en",
LC_ALL = (unset),
LANG = "en_CA"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
LANG 字串就是您需要的字串。
根據您的錯誤訊息的外觀,這應該適合您:
sudo locale-gen en_US en_US.UTF-8 pl_PL pl_PL.UTF-8
sudo dpkg-reconfigure locales
回想起來,Google搜尋這個錯誤訊息發現了很多修復方法;但很少人知道它是“為什麼”或“如何”引起的。我懷疑這與運行多個語言環境的使用者有關,這些語言環境可能存在不同程度的完整性。但我確實沒有任何依據,除了:
- 我從未在自己的機器上見過它。
- 我的電腦上的使用者配置為僅使用一種區域設定。
更多參考: