[linux] 解決錯誤訊息 perl: warning: Setting locale failed.

http://imgur.com/a/Wnx0W

yourUserName@ubuntu-14:~$ vim .bashrc
#在.bashrc檔案內增加此行 export LC_ALL="en_US.UTF-8"

然後執行
sudo locale-gen zh_TW.UTF-8
sudo dpkg-reconfigure locales
大功告成!

yourUserName@ubuntu-14:~$ sudo locale-gen zh_TW.UTF-8 
Generating locales...
  zh_TW.UTF-8... done
Generation complete.
yourUserName@ubuntu-14:~$ sudo dpkg-reconfigure locales 
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_PAPER = "lzh_TW",
    LC_ADDRESS = "lzh_TW",
    LC_MONETARY = "lzh_TW",
    LC_NUMERIC = "lzh_TW",
    LC_TELEPHONE = "lzh_TW",
    LC_IDENTIFICATION = "lzh_TW",
    LC_MEASUREMENT = "lzh_TW",
    LC_TIME = "lzh_TW",
    LC_NAME = "lzh_TW",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.ISO-8859-1... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
  zh_TW.UTF-8... up-to-date
Generation complete.

廣告

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com 標誌

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Google photo

您的留言將使用 Google 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 /  變更 )

連結到 %s