安装 lamp-server 时出错

安装 lamp-server 时出错

我想lamp-server通过安装tasksel。但是当我输入命令时 sudo tasksel install lamp-server,出现错误:

locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_PAPER = "fa_IR",
    LC_ADDRESS = "fa_IR",
    LC_MONETARY = "fa_IR",
    LC_NUMERIC = "fa_IR",
    LC_TELEPHONE = "fa_IR",
    LC_IDENTIFICATION = "fa_IR",
    LC_MEASUREMENT = "fa_IR",
    LC_TIME = "fa_IR",
    LC_NAME = "fa_IR",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
tasksel: aptitude failed (100)

我应该怎么办?

更新:输出locale -a

C
C.UTF-8
en_US.utf8
POSIX

答案1

我认为您需要生成语言fa_IR环境:

sudo locale-gen fa_IR

答案2

试试这个。只需按下键盘上的Ctrl+ Alt+T即可打开终端。打开后,运行以下命令:

export LANGUAGE=fa_IR
export LANG=en_US.UTF-8
export LC_ALL=fa_IR
locale-gen en_US.UTF-8
dpkg-reconfigure locales

尝试这样做:

sudo apt-get update
sudo tasksel lamp-server

相关内容