This post was initially published on January 16, 2017.
I have been getting warnings like below when I upgrade packages with
% sudo aptitude full-upgrade No packages will be installed, upgraded or removed. 0 packages upgrade, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_TYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("en_US.UTF-8"). locale: Cannot set LC_TYPE to default locale. No such file or directory locale: Cannot set LC_ALL to default locale. No such file or directory
Despite my previous attempts to fix this before, warnings did not go away. After digging around a bit more, disabling
SendEnv LANG LC_* from
/etc/ssh/ssh_config stopped the warnings from appearing.
# Site-wide defaults for some commonly used options. For a comprehensive # list of available options, their meanings and defaults, please see the # ssh_config(5) man page. Host * # 2017-01-16 TY: Disable this to prevent "warning: Setting locale failed" related # warnings. See http://qiita.com/networkelements/items/12e2448b75f7ff057139 # SendEnv LANG LC_*