ubuntu 13.04服务器上的locale-gen不起作用

时间:2016-04-03 22:52:12

标签: linux ubuntu locale ubuntu-13.04

由于我需要Ubuntu 13.04 Server (sudo) locale-gen "fa_IR.UTF-8"上的user@s1:~# sudo locale-gen "fa_IR.UTF-8" user@s1:~# 我的区域设置,我正尝试通过Ubuntu Desktop安装它,但我没有得到任何输出:

user@s1:~# sudo locale-gen "fa_IR.UTF-8"
Generating locales...
  fa_IR.UTF-8... done
Generation complete.
user@s1:~# 

它并没有在我的地区添加任何地方!

当我尝试在Memory Size: 8000 Number Cores: 1 Quantum: 100 Schedule Algorithm: FCFS Memory Allocation: First Swap Time: OFF Thread Quantum: OFF 上安装新的语言环境时,我没有收到此错误,而且效果很好!如下:

FILE *parameters;
parameters=(fopen("./Parameters.txt","r"));
if(parameters==NULL){
    printf("Error reading file.");
    exit(1);
}
char * strTemp;
int memSize, numCores, quantum, swapTime;
char * schedAlg, memAlloc;
fscanf(parameters, "%s %s %d", strTemp, strTemp, memSize);

请帮我解决问题,我该怎么办?

1 个答案:

答案 0 :(得分:0)

最后,我可以手动做一些事情来找到解决方案:

  1. 检查支持的语言环境:

    less /usr/share/i18n/SUPPORTED
    
  2. 将语言环境添加到生成的

    列表中
    (sudo) echo fa_IR.UTF-8 UTF-8 >> /var/lib/locales/supported.d/local
    
  3. 重新生成列表(它将调用locale-gen ...)

     (sudo) dpkg-reconfigure locales