Para corregir el error:
warning: setlocale: LC_CTYPE: cannot change locale (es_MX.UTF-8)
Solución:
export LC_ALL=es_MX.UTF-8
export LANG=es_MX.UTF-8
Para corregir el error:
warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8)
Solución:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
Fuente: https://askubuntu.com/questions/412495/setlocale-lc-ctype-cannot-change-locale-utf-8