0

I had reinstalled Windows and brought down a new version of Cmder and started noticing this message when I start it up:

env: /usr/bin/locale: No such file or directory

I'd like to know what I can do to fix it.

Cmder is also taking longer to start than it used to for some reason.

Code

I looked in the code and found this script which looks for that folder related to a Git check:

https://github.com/cmderdev/cmder/blob/master/vendor/init.bat#L279

I have Git installed in my system so I don't know what else I'd need to do to get this working.

1

You seem to have the same error as in Cmder bug report #1956 Git detection should use env from git install root.

The analysis of the problem by the author of the report says:

The reason the error is raised on my system (and Jorg's apparently), is that there is an env.exe in my path which does not automatically translates /usr/bin/locale to a "locale.exe somewhere my path". My env.exe actually tries to execute /usr/bin/locale, and as /usr/bin/locale does not exist, it raises the error. The issue is really about that the script assumes env works like the git provided env, and that assumption is broken on some systems, and it causes an error that is hard for users to fix.

Check the order of items in PATH and ensure that the right env is called.

1

I had the same problem, because earlier I installed "GitHub Desktop", then I installed cmdermini using chocolatey. The fact is that, the cmder determines the installed git because installed "GitHub Desktop", you can check it with where env command, the output is approximately:

"C:\Users\yourname\AppData\Local\GitHubDesktop\app-1.6.2\resources\app\git\usr\bin\env.exe"

(Possibly you have not installed "GitHub Desktop", but another cut version of git.)

But in this directory some files are missing, in particular "locale.exe". cmdred at startup performs the task described in init.bat, and there is a section for localization where the file locale.exe is use. cmder does not find file, and rightly informs you about this.

There are different ways to solve this problem.

  • As an example, you can install the full git on a virtual machine and simply copy the file locale.exe from

"C:\Program Files\Git\usr\bin"

to your directory

C:\Users\yourname\AppData\Local\GitHubDesktop\app-1.6.2\resources\app\git\usr\bin. 

The main thing is that the git bitness matches (e.g. 64 on your and virtual machine).

  • Alternatively, you can install another version of git using e.g. chocolatey and edit the system variable PATH, so that cmder will use it.

  • Or edit the start task cmder, having tried to disable locale.exe search in init.bat.

  • Maybe you can install full version cmder wich include git inside.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.