Can't set locale; make sure $LC_* and $LANG are correct!locale not found/setting locale failed - what should I do?set LC_* but not LC_ALLWhy is almost every program complaining about my locale?Debian thinks my file system is encoded as ISO-8859-1Can't install localesProblem of Can't set locale; make sure $LC_* and $LANG are correct!UTF-8 characters are not displayed correctly in DebianShould I set LANG environment variable or use localectl set-locale?Can't set permanent locale settings for bashCan't set system default locale on debian raspberry pi. LANG empty`locale -a` appears to report locale aliases, not the list of currently compiled locales

Pronouncing Dictionary.com's W.O.D "vade mecum" in English

Can I interfere when another PC is about to be attacked?

Can I make popcorn with any corn?

Shell script can be run only with sh command

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

What would happen to a modern skyscraper if it rains micro blackholes?

How do I create uniquely male characters?

How is it possible to have an ability score that is less than 3?

Should I join office cleaning event for free?

If Manufacturer spice model and Datasheet give different values which should I use?

What defenses are there against being summoned by the Gate spell?

What makes Graph invariants so useful/important?

Prevent a directory in /tmp from being deleted

Download, install and reboot computer at night if needed

Copenhagen passport control - US citizen

A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?

The use of multiple foreign keys on same column in SQL Server

Why is "Reports" in sentence down without "The"

Can a German sentence have two subjects?

Set-theoretical foundations of Mathematics with only bounded quantifiers

Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?

How can I fix this gap between bookcases I made?

What is the logic behind how bash tests for true/false?

Email Account under attack (really) - anything I can do?



Can't set locale; make sure $LC_* and $LANG are correct!


locale not found/setting locale failed - what should I do?set LC_* but not LC_ALLWhy is almost every program complaining about my locale?Debian thinks my file system is encoded as ISO-8859-1Can't install localesProblem of Can't set locale; make sure $LC_* and $LANG are correct!UTF-8 characters are not displayed correctly in DebianShould I set LANG environment variable or use localectl set-locale?Can't set permanent locale settings for bashCan't set system default locale on debian raspberry pi. LANG empty`locale -a` appears to report locale aliases, not the list of currently compiled locales






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















UPDATE



I found the problem. I need to relog after setting the language variables. But what I'm wondering is: How would I relog inside a vagrant script? Is this even possible?



Introduction



I've read about this problem already on other threads



locale not found/setting locale failed - what should I do?



but it didn't help me really. The accepted answer asked if the line with the desired language is uncommented in /etc/locale.gen which it is in my case, but it still doesn't work.



What I'm trying to achieve

I'm building a Vagrant box with debian/jessie64 which should automatically set the language variables to German. I have locale.gen file in my vagrant folder which should replace the default one in /etc/locale.gen with this command



sudo cp /var/www/project/www/vagrant_ressources/locale.gen /etc/



These are the contents of locale.gen



de_DE ISO-8859-1
de_DE.UTF-8 UTF-8
de_DE@euro ISO-8859-15
en_US.UTF-8 UTF-8


Afterwards I'm regenerating the locals with sudo locale-gen. This is the output



Generating locales (this might take a while)...
de_DE.ISO-8859-1... done
de_DE.UTF-8... done
de_DE.ISO-8859-15@euro... done
Generation complete.


Now I'm trying to install a package sudo apt-get install -y php7.0-fpm and am getting the warning



perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "de_DE.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory


Why does de_DE.UTF-8 come up there? I also want to do this without using dpkg-reconfigure because this is a script which should do everything without user input. And dpkg-reconfigure simply creates the locale.gen file, nothing more, right?



Also, when using sudo dpkg-reconfigure locales the entries from my own locale.gen file are already selected. So it seems like part of this works.



When typing in locale -a these are the results



C
C.UTF-8
de_DE
de_DE@euro
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
deutsch
german
POSIX









share|improve this question






























    2















    UPDATE



    I found the problem. I need to relog after setting the language variables. But what I'm wondering is: How would I relog inside a vagrant script? Is this even possible?



    Introduction



    I've read about this problem already on other threads



    locale not found/setting locale failed - what should I do?



    but it didn't help me really. The accepted answer asked if the line with the desired language is uncommented in /etc/locale.gen which it is in my case, but it still doesn't work.



    What I'm trying to achieve

    I'm building a Vagrant box with debian/jessie64 which should automatically set the language variables to German. I have locale.gen file in my vagrant folder which should replace the default one in /etc/locale.gen with this command



    sudo cp /var/www/project/www/vagrant_ressources/locale.gen /etc/



    These are the contents of locale.gen



    de_DE ISO-8859-1
    de_DE.UTF-8 UTF-8
    de_DE@euro ISO-8859-15
    en_US.UTF-8 UTF-8


    Afterwards I'm regenerating the locals with sudo locale-gen. This is the output



    Generating locales (this might take a while)...
    de_DE.ISO-8859-1... done
    de_DE.UTF-8... done
    de_DE.ISO-8859-15@euro... done
    Generation complete.


    Now I'm trying to install a package sudo apt-get install -y php7.0-fpm and am getting the warning



    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "de_DE.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory


    Why does de_DE.UTF-8 come up there? I also want to do this without using dpkg-reconfigure because this is a script which should do everything without user input. And dpkg-reconfigure simply creates the locale.gen file, nothing more, right?



    Also, when using sudo dpkg-reconfigure locales the entries from my own locale.gen file are already selected. So it seems like part of this works.



    When typing in locale -a these are the results



    C
    C.UTF-8
    de_DE
    de_DE@euro
    de_DE.iso88591
    de_DE.iso885915@euro
    de_DE.utf8
    deutsch
    german
    POSIX









    share|improve this question


























      2












      2








      2








      UPDATE



      I found the problem. I need to relog after setting the language variables. But what I'm wondering is: How would I relog inside a vagrant script? Is this even possible?



      Introduction



      I've read about this problem already on other threads



      locale not found/setting locale failed - what should I do?



      but it didn't help me really. The accepted answer asked if the line with the desired language is uncommented in /etc/locale.gen which it is in my case, but it still doesn't work.



      What I'm trying to achieve

      I'm building a Vagrant box with debian/jessie64 which should automatically set the language variables to German. I have locale.gen file in my vagrant folder which should replace the default one in /etc/locale.gen with this command



      sudo cp /var/www/project/www/vagrant_ressources/locale.gen /etc/



      These are the contents of locale.gen



      de_DE ISO-8859-1
      de_DE.UTF-8 UTF-8
      de_DE@euro ISO-8859-15
      en_US.UTF-8 UTF-8


      Afterwards I'm regenerating the locals with sudo locale-gen. This is the output



      Generating locales (this might take a while)...
      de_DE.ISO-8859-1... done
      de_DE.UTF-8... done
      de_DE.ISO-8859-15@euro... done
      Generation complete.


      Now I'm trying to install a package sudo apt-get install -y php7.0-fpm and am getting the warning



      perl: warning: Setting locale failed.
      perl: warning: Please check that your locale settings:
      LANGUAGE = (unset),
      LC_ALL = (unset),
      LC_CTYPE = "de_DE.UTF-8",
      LANG = "en_US.UTF-8"
      are supported and installed on your system.
      perl: warning: Falling back to the standard locale ("C").
      locale: Cannot set LC_MESSAGES to default locale: No such file or directory
      locale: Cannot set LC_ALL to default locale: No such file or directory


      Why does de_DE.UTF-8 come up there? I also want to do this without using dpkg-reconfigure because this is a script which should do everything without user input. And dpkg-reconfigure simply creates the locale.gen file, nothing more, right?



      Also, when using sudo dpkg-reconfigure locales the entries from my own locale.gen file are already selected. So it seems like part of this works.



      When typing in locale -a these are the results



      C
      C.UTF-8
      de_DE
      de_DE@euro
      de_DE.iso88591
      de_DE.iso885915@euro
      de_DE.utf8
      deutsch
      german
      POSIX









      share|improve this question
















      UPDATE



      I found the problem. I need to relog after setting the language variables. But what I'm wondering is: How would I relog inside a vagrant script? Is this even possible?



      Introduction



      I've read about this problem already on other threads



      locale not found/setting locale failed - what should I do?



      but it didn't help me really. The accepted answer asked if the line with the desired language is uncommented in /etc/locale.gen which it is in my case, but it still doesn't work.



      What I'm trying to achieve

      I'm building a Vagrant box with debian/jessie64 which should automatically set the language variables to German. I have locale.gen file in my vagrant folder which should replace the default one in /etc/locale.gen with this command



      sudo cp /var/www/project/www/vagrant_ressources/locale.gen /etc/



      These are the contents of locale.gen



      de_DE ISO-8859-1
      de_DE.UTF-8 UTF-8
      de_DE@euro ISO-8859-15
      en_US.UTF-8 UTF-8


      Afterwards I'm regenerating the locals with sudo locale-gen. This is the output



      Generating locales (this might take a while)...
      de_DE.ISO-8859-1... done
      de_DE.UTF-8... done
      de_DE.ISO-8859-15@euro... done
      Generation complete.


      Now I'm trying to install a package sudo apt-get install -y php7.0-fpm and am getting the warning



      perl: warning: Setting locale failed.
      perl: warning: Please check that your locale settings:
      LANGUAGE = (unset),
      LC_ALL = (unset),
      LC_CTYPE = "de_DE.UTF-8",
      LANG = "en_US.UTF-8"
      are supported and installed on your system.
      perl: warning: Falling back to the standard locale ("C").
      locale: Cannot set LC_MESSAGES to default locale: No such file or directory
      locale: Cannot set LC_ALL to default locale: No such file or directory


      Why does de_DE.UTF-8 come up there? I also want to do this without using dpkg-reconfigure because this is a script which should do everything without user input. And dpkg-reconfigure simply creates the locale.gen file, nothing more, right?



      Also, when using sudo dpkg-reconfigure locales the entries from my own locale.gen file are already selected. So it seems like part of this works.



      When typing in locale -a these are the results



      C
      C.UTF-8
      de_DE
      de_DE@euro
      de_DE.iso88591
      de_DE.iso885915@euro
      de_DE.utf8
      deutsch
      german
      POSIX






      debian locale vagrant






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 13 '17 at 12:37









      Community

      1




      1










      asked Apr 15 '16 at 14:30









      MusterknabeMusterknabe

      12115




      12115




















          1 Answer
          1






          active

          oldest

          votes


















          0














          At the moment you seem to have changed LC_CTYPE but not LANG



          Make sure you updated /etc/default/locale correctly. Then you could just source /etc/default/locale after running locale-gen.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f276715%2fcant-set-locale-make-sure-lc-and-lang-are-correct%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            At the moment you seem to have changed LC_CTYPE but not LANG



            Make sure you updated /etc/default/locale correctly. Then you could just source /etc/default/locale after running locale-gen.






            share|improve this answer





























              0














              At the moment you seem to have changed LC_CTYPE but not LANG



              Make sure you updated /etc/default/locale correctly. Then you could just source /etc/default/locale after running locale-gen.






              share|improve this answer



























                0












                0








                0







                At the moment you seem to have changed LC_CTYPE but not LANG



                Make sure you updated /etc/default/locale correctly. Then you could just source /etc/default/locale after running locale-gen.






                share|improve this answer















                At the moment you seem to have changed LC_CTYPE but not LANG



                Make sure you updated /etc/default/locale correctly. Then you could just source /etc/default/locale after running locale-gen.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Apr 15 '16 at 15:40

























                answered Apr 15 '16 at 15:35









                sourcejedisourcejedi

                25.7k445113




                25.7k445113



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • 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%2funix.stackexchange.com%2fquestions%2f276715%2fcant-set-locale-make-sure-lc-and-lang-are-correct%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

                    getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

                    Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

                    Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.