Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

解決 Linux 下 scp 按 Tab 鍵出現 setlocale: LC_CTYPE 警告

編輯:Linux 教學

使用 scp 並按 Tab 自動完成時,若出現:

-bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8)

原因是遠端主機缺少對應的 locale 設定。最快解法是在當前 Shell 匯出通用 locale:

export LC_ALL=en_US.UTF-8

若需永久生效,可加入 ~/.bash_profile 或 ~/.bashrc。亦可在遠端主機執行 locale-gen zh_CN.UTF-8 產生缺失的 locale。

Copyright © Windows教程網 All Rights Reserved