如何设置区域设置?

安装干净的Ubuntu Server后,运行’perl’时出现以下错误。

perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_CA.utf8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). 

我应该在哪里设置我的区域设置,系统范围和用户特定的? 如果有一个命令行实用程序来执行它,我宁愿使用它而不是手动编辑配置文件。

在终端中键入以下内容以消除该错误,

sudo apt-get install language-pack-en-base

sudo dpkg-reconfigure locales