Unable to start server because because `minecraft` user locales are not set correctly.
broes5 opened this issue · 3 comments
Whenever I type minecraftd start
, the command returns Starting server...tmux: need UTF-8 locale (LC_CTYPE) but have ANSI_X3.4-1968
and the server does not start. This is because all of the minecraft
user's locales are set to "POSIX"
. So far I haven't worked out how to change them to the same values as my user. I've created a .bashrc
file containing the text export LC_CTYPE=en_AU.UTF-8
in /srv/minecraft
, which fixes the problem, but only when I login as the minecraft
user and type the command again.
Never mind. I was able to fix the issue by adding an extra option to my /etc/doas.conf
file.
I am a bit confused by your description of the solution. How does doas
come into play?
If there is a setting under which the minecraft server does not work under a specific language, I am happy to fix that. I assume, it is as simple as adding a an LC_ALL=C
at the top of the main script.
I have doas
installed on my system instead of sudo
because it is a much smaller and simpler program. I also like it because it's configuration file syntax is simpler and easier for me to understand. Changing your script to use doas
instead of sudo
didn't take me long. All I had to do was substitute all occurrences of the string "sudo" in lower and uppercase with "doas" in the script.
I tried adding export LC_CTYPE=en_AU.UTF-8
to the start of the script, but it didn't work. There's nothing wrong with minecraft-server
. The issue was most likely caused because I changed the script to use doas
instead of sudo
.