locale: Cannot set LC_CTYPE to default locale: No such file or directory locale
27,578
Solution 1
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
Solution 2
This one worked for me.
sudo -i
locale
export LANGUAGE=en_US.UTF-8; export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8; locale-gen en_US.UTF-8
dpkg-reconfigure locales
reboot
Related videos on Youtube
Author by
Jayanth Krishnamoorthy
Updated on September 18, 2022Comments
-
Jayanth Krishnamoorthy 3 monthsI'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 directoryIt 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.
-
Gunnar Hjalmarsson almost 6 yearsDid you install Ubuntu yourself or was it pre-installed? Anyway, can you please open a terminal window, run thelocalecommand, and show us the complete output by editing your question.
-
-
Admin almost 6 yearsRather than commenting, edit your post to add the information. -
Galvani almost 6 yearswilldo next time