使用操作系统语言安装 gnu make
我在我的 Windows 机器上安装了最新的 GNU make。
安装程序决定将语言设置为操作系统语言,但我没有收到提示。我希望它是英文的。我的操作系统是瑞典语。
我记得我在另一个 GNU 程序中遇到了类似的问题(不记得是哪个),这是通过添加环境变量“lang”和值“c”来解决的。
如何将 GNU make 的语言切换为英语?
I installed the latest GNU make to my windows machine.
The installer decided to setup the language as the OS language, which I did not get prompted for. I want it to be english. My OS is in swedish.
I remember I had similar problem with another GNU program (can't recall which), which was solved by adding the env var "lang" with value "c".
How can I switch the language of GNU make to english?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我的操作系统是日语,所以终端输出乱码。对我有用的是设置
LANGUAGE
变量:虽然 文档另有说明,我没有运气设置其他环境变量。
My OS is Japanese, so the terminal was outputting gibberish. What worked for me was setting the
LANGUAGE
variable:Although the documentation suggests otherwise, I had no luck setting other environment variables.
我不知道 Windows 是否有区分大小写的环境变量,但我希望 GNU make 能够使用
LANG=C
完全切换到美国英语。如果这没有帮助,请尝试LC_ALL=C
,或者检查 mingw 环境中是否有locale
命令,该命令可以帮助您显示确切的区域设置。如果您在 mingw bash shell 中设置这些环境变量,请确保 shell 将这些环境变量导出到它启动的进程(例如询问
make
)。即,首先使用export FOO=bar
设置值,或者在使用FOO=bar
设置值后使用单独的export FOO
导出它们>。(我假设 mingw 在语言环境方面表现得像标准 GNU 环境。)
I am not aware of whether Windows has case sensitive environment variables, but I would expect GNU make to switch to completely switch to US English with
LANG=C
. If that does not help, tryLC_ALL=C
, or check whether there is alocale
command in the mingw environment which could help show you the exact locale settings.If you set these environment variables from within the mingw bash shell, make sure that the shell exports those environment variables to the processes it starts (such ask
make
). I.e. either set the values withexport FOO=bar
to begin with, or export them with a separateexport FOO
after having set them withFOO=bar
.(I am presuming mingw behaves like a standard GNU environment when it comes to locales.)
对于我在具有德语语言环境的 Linux 下,直接将其传递给 make 可以在 bash 中使用:
For me under Linux with German locale, passing this directly to make as follows works with bash: