Setting locales on Debian – Solving the error “Cannot set LC_CTYPE to default locale”

This is done by installing and setting locales

sudo locale-gen en_US en_US.UTF-8
dpkg-reconfigure locales