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












3














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.










share|improve this question




















  • 1




    Did you install Ubuntu yourself or was it pre-installed? Anyway, can you please open a terminal window, run the locale command, and show us the complete output by editing your question.
    – Gunnar Hjalmarsson
    Feb 9 '17 at 23:48
















3














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.










share|improve this question




















  • 1




    Did you install Ubuntu yourself or was it pre-installed? Anyway, can you please open a terminal window, run the locale command, and show us the complete output by editing your question.
    – Gunnar Hjalmarsson
    Feb 9 '17 at 23:48














3












3








3


3





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.










share|improve this question















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.







locale






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 21 '17 at 8:01









muru

1




1










asked Feb 9 '17 at 23:17









Jayanth KrishnamoorthyJayanth Krishnamoorthy

16113




16113








  • 1




    Did you install Ubuntu yourself or was it pre-installed? Anyway, can you please open a terminal window, run the locale command, and show us the complete output by editing your question.
    – Gunnar Hjalmarsson
    Feb 9 '17 at 23:48














  • 1




    Did you install Ubuntu yourself or was it pre-installed? Anyway, can you please open a terminal window, run the locale command, and show us the complete output by editing your question.
    – Gunnar Hjalmarsson
    Feb 9 '17 at 23:48








1




1




Did you install Ubuntu yourself or was it pre-installed? Anyway, can you please open a terminal window, run the locale command, and show us the complete output by editing your question.
– Gunnar Hjalmarsson
Feb 9 '17 at 23:48




Did you install Ubuntu yourself or was it pre-installed? Anyway, can you please open a terminal window, run the locale command, and show us the complete output by editing your question.
– Gunnar Hjalmarsson
Feb 9 '17 at 23:48










3 Answers
3






active

oldest

votes


















10














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






share|improve this answer























  • And regarding the missing locales, to generate them: sudo dpkg-reconfigure locales
    – Galvani
    Mar 16 '17 at 8:55








  • 3




    Rather than commenting, edit your post to add the information.
    – UniversallyUniqueID
    Mar 16 '17 at 9:14






  • 1




    willdo next time
    – Galvani
    Mar 17 '17 at 11:15



















3














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





share|improve this answer































    0














    This worked for me (On Ubuntu 14.04 - but probably works on other systems)



    sudo localedef -v -c -i en_US -f UTF-8 en_US.UTF-8





    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f881742%2flocale-cannot-set-lc-ctype-to-default-locale-no-such-file-or-directory-locale%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      10














      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






      share|improve this answer























      • And regarding the missing locales, to generate them: sudo dpkg-reconfigure locales
        – Galvani
        Mar 16 '17 at 8:55








      • 3




        Rather than commenting, edit your post to add the information.
        – UniversallyUniqueID
        Mar 16 '17 at 9:14






      • 1




        willdo next time
        – Galvani
        Mar 17 '17 at 11:15
















      10














      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






      share|improve this answer























      • And regarding the missing locales, to generate them: sudo dpkg-reconfigure locales
        – Galvani
        Mar 16 '17 at 8:55








      • 3




        Rather than commenting, edit your post to add the information.
        – UniversallyUniqueID
        Mar 16 '17 at 9:14






      • 1




        willdo next time
        – Galvani
        Mar 17 '17 at 11:15














      10












      10








      10






      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






      share|improve this 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







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Mar 16 '17 at 15:10







      user589808

















      answered Mar 16 '17 at 8:53









      GalvaniGalvani

      1317




      1317












      • And regarding the missing locales, to generate them: sudo dpkg-reconfigure locales
        – Galvani
        Mar 16 '17 at 8:55








      • 3




        Rather than commenting, edit your post to add the information.
        – UniversallyUniqueID
        Mar 16 '17 at 9:14






      • 1




        willdo next time
        – Galvani
        Mar 17 '17 at 11:15


















      • And regarding the missing locales, to generate them: sudo dpkg-reconfigure locales
        – Galvani
        Mar 16 '17 at 8:55








      • 3




        Rather than commenting, edit your post to add the information.
        – UniversallyUniqueID
        Mar 16 '17 at 9:14






      • 1




        willdo next time
        – Galvani
        Mar 17 '17 at 11:15
















      And regarding the missing locales, to generate them: sudo dpkg-reconfigure locales
      – Galvani
      Mar 16 '17 at 8:55






      And regarding the missing locales, to generate them: sudo dpkg-reconfigure locales
      – Galvani
      Mar 16 '17 at 8:55






      3




      3




      Rather than commenting, edit your post to add the information.
      – UniversallyUniqueID
      Mar 16 '17 at 9:14




      Rather than commenting, edit your post to add the information.
      – UniversallyUniqueID
      Mar 16 '17 at 9:14




      1




      1




      willdo next time
      – Galvani
      Mar 17 '17 at 11:15




      willdo next time
      – Galvani
      Mar 17 '17 at 11:15













      3














      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





      share|improve this answer




























        3














        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





        share|improve this answer


























          3












          3








          3






          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





          share|improve this answer














          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






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 21 '17 at 8:01









          karel

          57.6k12128146




          57.6k12128146










          answered Mar 21 '17 at 7:56









          CelesteMultimediaCelesteMultimedia

          311




          311























              0














              This worked for me (On Ubuntu 14.04 - but probably works on other systems)



              sudo localedef -v -c -i en_US -f UTF-8 en_US.UTF-8





              share|improve this answer


























                0














                This worked for me (On Ubuntu 14.04 - but probably works on other systems)



                sudo localedef -v -c -i en_US -f UTF-8 en_US.UTF-8





                share|improve this answer
























                  0












                  0








                  0






                  This worked for me (On Ubuntu 14.04 - but probably works on other systems)



                  sudo localedef -v -c -i en_US -f UTF-8 en_US.UTF-8





                  share|improve this answer












                  This worked for me (On Ubuntu 14.04 - but probably works on other systems)



                  sudo localedef -v -c -i en_US -f UTF-8 en_US.UTF-8






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 5 at 0:23









                  Craig S. AndersonCraig S. Anderson

                  1246




                  1246






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f881742%2flocale-cannot-set-lc-ctype-to-default-locale-no-such-file-or-directory-locale%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      How did Captain America manage to do this?

                      迪纳利

                      南乌拉尔铁路局