Unknown locale UTF-8 when installing MsSQL server on ubuntu












0















I'm trying to install Ms SQL Server on ubuntu 17.10, I run commands step by step:



wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"

sudo apt-get update

sudo apt-get install -y mssql-server


and when I run setup command:



sudo /opt/mssql/bin/mssql-conf setup


I get the following error:



Traceback (most recent call last):
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 277, in <module>
main()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 273, in main
processCommands()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 197, in processCommands
COMMAND_TABLE[args.which]()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 54, in handleSetup
exit(mssqlconfhelper.setupSqlServer(eulaAccepted, noprompt=args.noprompt))
File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 817, in setupSqlServer
languageSelect(noprompt)
File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 160, in languageSelect
language = locale.getdefaultlocale()[0]
File "/usr/lib/python2.7/locale.py", line 545, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python2.7/locale.py", line 477, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8


locale command outputs:



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
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE=UTF-8
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=
root@ubuntu-mssql-server:~#


what might be the solution?










share|improve this question

























  • Do you log in to the server from a macOS machine?

    – Gunnar Hjalmarsson
    Jan 14 '18 at 1:48











  • @gunnar yes, I'm logging from macos terminal using ssh

    – Arkadi
    Jan 14 '18 at 7:33











  • Ok. UTF-8 is an invalid locale name on Ubuntu, and probably you export a locale variable to that name when logging in. Does possibly the file ~/.ssh/environment exist which sets some locale variable to UTF-8?

    – Gunnar Hjalmarsson
    Jan 14 '18 at 10:33











  • There's no dir ~/.ssh/environment

    – Arkadi
    Jan 14 '18 at 11:33











  • Then can you please show us the output of the locale command (by editing your question).

    – Gunnar Hjalmarsson
    Jan 14 '18 at 11:39
















0















I'm trying to install Ms SQL Server on ubuntu 17.10, I run commands step by step:



wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"

sudo apt-get update

sudo apt-get install -y mssql-server


and when I run setup command:



sudo /opt/mssql/bin/mssql-conf setup


I get the following error:



Traceback (most recent call last):
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 277, in <module>
main()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 273, in main
processCommands()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 197, in processCommands
COMMAND_TABLE[args.which]()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 54, in handleSetup
exit(mssqlconfhelper.setupSqlServer(eulaAccepted, noprompt=args.noprompt))
File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 817, in setupSqlServer
languageSelect(noprompt)
File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 160, in languageSelect
language = locale.getdefaultlocale()[0]
File "/usr/lib/python2.7/locale.py", line 545, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python2.7/locale.py", line 477, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8


locale command outputs:



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
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE=UTF-8
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=
root@ubuntu-mssql-server:~#


what might be the solution?










share|improve this question

























  • Do you log in to the server from a macOS machine?

    – Gunnar Hjalmarsson
    Jan 14 '18 at 1:48











  • @gunnar yes, I'm logging from macos terminal using ssh

    – Arkadi
    Jan 14 '18 at 7:33











  • Ok. UTF-8 is an invalid locale name on Ubuntu, and probably you export a locale variable to that name when logging in. Does possibly the file ~/.ssh/environment exist which sets some locale variable to UTF-8?

    – Gunnar Hjalmarsson
    Jan 14 '18 at 10:33











  • There's no dir ~/.ssh/environment

    – Arkadi
    Jan 14 '18 at 11:33











  • Then can you please show us the output of the locale command (by editing your question).

    – Gunnar Hjalmarsson
    Jan 14 '18 at 11:39














0












0








0








I'm trying to install Ms SQL Server on ubuntu 17.10, I run commands step by step:



wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"

sudo apt-get update

sudo apt-get install -y mssql-server


and when I run setup command:



sudo /opt/mssql/bin/mssql-conf setup


I get the following error:



Traceback (most recent call last):
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 277, in <module>
main()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 273, in main
processCommands()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 197, in processCommands
COMMAND_TABLE[args.which]()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 54, in handleSetup
exit(mssqlconfhelper.setupSqlServer(eulaAccepted, noprompt=args.noprompt))
File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 817, in setupSqlServer
languageSelect(noprompt)
File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 160, in languageSelect
language = locale.getdefaultlocale()[0]
File "/usr/lib/python2.7/locale.py", line 545, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python2.7/locale.py", line 477, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8


locale command outputs:



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
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE=UTF-8
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=
root@ubuntu-mssql-server:~#


what might be the solution?










share|improve this question
















I'm trying to install Ms SQL Server on ubuntu 17.10, I run commands step by step:



wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"

sudo apt-get update

sudo apt-get install -y mssql-server


and when I run setup command:



sudo /opt/mssql/bin/mssql-conf setup


I get the following error:



Traceback (most recent call last):
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 277, in <module>
main()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 273, in main
processCommands()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 197, in processCommands
COMMAND_TABLE[args.which]()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 54, in handleSetup
exit(mssqlconfhelper.setupSqlServer(eulaAccepted, noprompt=args.noprompt))
File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 817, in setupSqlServer
languageSelect(noprompt)
File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 160, in languageSelect
language = locale.getdefaultlocale()[0]
File "/usr/lib/python2.7/locale.py", line 545, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python2.7/locale.py", line 477, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8


locale command outputs:



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
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE=UTF-8
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=
root@ubuntu-mssql-server:~#


what might be the solution?







python locale mssql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 14 '18 at 12:24







Arkadi

















asked Jan 13 '18 at 18:58









ArkadiArkadi

13417




13417













  • Do you log in to the server from a macOS machine?

    – Gunnar Hjalmarsson
    Jan 14 '18 at 1:48











  • @gunnar yes, I'm logging from macos terminal using ssh

    – Arkadi
    Jan 14 '18 at 7:33











  • Ok. UTF-8 is an invalid locale name on Ubuntu, and probably you export a locale variable to that name when logging in. Does possibly the file ~/.ssh/environment exist which sets some locale variable to UTF-8?

    – Gunnar Hjalmarsson
    Jan 14 '18 at 10:33











  • There's no dir ~/.ssh/environment

    – Arkadi
    Jan 14 '18 at 11:33











  • Then can you please show us the output of the locale command (by editing your question).

    – Gunnar Hjalmarsson
    Jan 14 '18 at 11:39



















  • Do you log in to the server from a macOS machine?

    – Gunnar Hjalmarsson
    Jan 14 '18 at 1:48











  • @gunnar yes, I'm logging from macos terminal using ssh

    – Arkadi
    Jan 14 '18 at 7:33











  • Ok. UTF-8 is an invalid locale name on Ubuntu, and probably you export a locale variable to that name when logging in. Does possibly the file ~/.ssh/environment exist which sets some locale variable to UTF-8?

    – Gunnar Hjalmarsson
    Jan 14 '18 at 10:33











  • There's no dir ~/.ssh/environment

    – Arkadi
    Jan 14 '18 at 11:33











  • Then can you please show us the output of the locale command (by editing your question).

    – Gunnar Hjalmarsson
    Jan 14 '18 at 11:39

















Do you log in to the server from a macOS machine?

– Gunnar Hjalmarsson
Jan 14 '18 at 1:48





Do you log in to the server from a macOS machine?

– Gunnar Hjalmarsson
Jan 14 '18 at 1:48













@gunnar yes, I'm logging from macos terminal using ssh

– Arkadi
Jan 14 '18 at 7:33





@gunnar yes, I'm logging from macos terminal using ssh

– Arkadi
Jan 14 '18 at 7:33













Ok. UTF-8 is an invalid locale name on Ubuntu, and probably you export a locale variable to that name when logging in. Does possibly the file ~/.ssh/environment exist which sets some locale variable to UTF-8?

– Gunnar Hjalmarsson
Jan 14 '18 at 10:33





Ok. UTF-8 is an invalid locale name on Ubuntu, and probably you export a locale variable to that name when logging in. Does possibly the file ~/.ssh/environment exist which sets some locale variable to UTF-8?

– Gunnar Hjalmarsson
Jan 14 '18 at 10:33













There's no dir ~/.ssh/environment

– Arkadi
Jan 14 '18 at 11:33





There's no dir ~/.ssh/environment

– Arkadi
Jan 14 '18 at 11:33













Then can you please show us the output of the locale command (by editing your question).

– Gunnar Hjalmarsson
Jan 14 '18 at 11:39





Then can you please show us the output of the locale command (by editing your question).

– Gunnar Hjalmarsson
Jan 14 '18 at 11:39










2 Answers
2






active

oldest

votes


















1














As a workaround I suggest that you open the ~/.profile file for editing and add the line:



unset LC_CTYPE


That ought to compensate for the issue.






share|improve this answer































    1














    Reading from other forums I found that if you change the local variable named "LC_ALL", it has to be set to the following value: en_US.UTF-8.



    The way to do this is to execute the following command as root:



    export LC_ALL=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%2f995583%2funknown-locale-utf-8-when-installing-mssql-server-on-ubuntu%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      As a workaround I suggest that you open the ~/.profile file for editing and add the line:



      unset LC_CTYPE


      That ought to compensate for the issue.






      share|improve this answer




























        1














        As a workaround I suggest that you open the ~/.profile file for editing and add the line:



        unset LC_CTYPE


        That ought to compensate for the issue.






        share|improve this answer


























          1












          1








          1







          As a workaround I suggest that you open the ~/.profile file for editing and add the line:



          unset LC_CTYPE


          That ought to compensate for the issue.






          share|improve this answer













          As a workaround I suggest that you open the ~/.profile file for editing and add the line:



          unset LC_CTYPE


          That ought to compensate for the issue.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 14 '18 at 13:32









          Gunnar HjalmarssonGunnar Hjalmarsson

          19.4k23461




          19.4k23461

























              1














              Reading from other forums I found that if you change the local variable named "LC_ALL", it has to be set to the following value: en_US.UTF-8.



              The way to do this is to execute the following command as root:



              export LC_ALL=en_US.UTF-8





              share|improve this answer






























                1














                Reading from other forums I found that if you change the local variable named "LC_ALL", it has to be set to the following value: en_US.UTF-8.



                The way to do this is to execute the following command as root:



                export LC_ALL=en_US.UTF-8





                share|improve this answer




























                  1












                  1








                  1







                  Reading from other forums I found that if you change the local variable named "LC_ALL", it has to be set to the following value: en_US.UTF-8.



                  The way to do this is to execute the following command as root:



                  export LC_ALL=en_US.UTF-8





                  share|improve this answer















                  Reading from other forums I found that if you change the local variable named "LC_ALL", it has to be set to the following value: en_US.UTF-8.



                  The way to do this is to execute the following command as root:



                  export LC_ALL=en_US.UTF-8






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Oct 30 '18 at 20:23









                  zx485

                  1,47131115




                  1,47131115










                  answered Oct 30 '18 at 19:17









                  Nicolas HernandezNicolas Hernandez

                  163




                  163






























                      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.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f995583%2funknown-locale-utf-8-when-installing-mssql-server-on-ubuntu%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 to make a Squid Proxy server?

                      Is this a new Fibonacci Identity?

                      19世紀