Ubuntu – locale: Cannot set LC_CTYPE to default locale: No such file or directory locale

locale

I've bought a new laptop DELL Inspiron i3 5th gen 3000 series. On my first login, even before restarting, I tried to apply updates and I got the error

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

It was so nagging to see this because I was using a Compaq laptop earlier and I had the same error, which I could never fix.

Best Answer

Insert into /etc/default/locale:

LC_CTYPE="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LANG="en_US.UTF-8"

And regarding the missing locales, to generate them: sudo dpkg-reconfigure locales

Related Question