When I was installing Nimble, there was a problem.
git clone https://github.com/nim-lang/nimble.git
cd nimble
nim c -r src/nimble install
Problem description:
Couldn't find Nim version.
Error:execution of an external program failed: './src/nimble install'
In addition,my Nim compiler works correctly and is the latest version.
I'm sorry
When I execute nim -v,there is such a result:
Nim Compile Version 0.12.1 (2015-11-15) [Linux: amd64]
Copyright (c) 2006-2015 by Andreas Rumpf
git hash :0f7fdd8bf4d4f747f01c4d95ce64d96763286afc
active boot switches: -d:release
proc getNimBin*: string =
result = "nim"
if findExe("nim") != "": result = "nim"
elif findExe("nimrod") != "": result = "nimrod"
If findexe("nim") returns a result, the string "nim" is used as opposed to whatever findNim returned. It sometimes happens that nim is on PATH only in some shells, and this fails (I know it happened to me, even though on bash I had nim on PATH). I think they should become
proc getNimBin*: string =
result = "nim"
let nim = findExe("nim")
let nimrod = findExe("nimrod")
if nim != "": result = nim
elif nimrod != "": result = nimrod
By the way, I already opened an issue about this here I think that just changing these few lines should solve it.
In my case, what caused the problem in the first place was that I had a line like PATH=~/tools/Nim/bin:$PATH in my .bashrc. This worked on bash, but failed on sh (that is apparently used by Nim when executing external programs.) Making it PATH=$HOME/tools/Nim/bin:$PATH solved the problem for me.