2
votes

I'm having trouble installing and configuring Leiningen on a Windows 7 work computer. I'm assuming that my company's firewall prevents the GitHub security certificate from authenticating.

I've tried to use the standalone jar but had trouble using it will several development tools Id like to use to work on Clojure projects.

What is the best way to get Leiningen set up given these circumstances? Is there a way to install curl or wget on Windows and call them from the batch file?

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

The error Im getting is:

Downloading Leiningen now...

'powershell' is not recognized as an internal or external command, operable program or batch file.

Failed to download https://github.com/technomancy/leiningen/releases/download/2. 7.1/leiningen-2.7.1-standalone.zip

It is possible that the download failed due to "powershell", "curl" or "wget"'s inability to retrieve GitHub's security certificate. The suggestions below do not check certificates, so use this only if you understand the security implications of not doing so.

The PowerShell failed to download the latest Leiningen version. Try to use "curl" or "wget" to download Leiningen by setting up the HTTP_CLIENT environment variable with one of the following values:

a) set HTTP_CLIENT=wget --no-check-certificate -O b) set HTTP_CLIENT=curl -f -L -k -o

NOTE: Make sure to not add double quotes when setting the value of HTTP_CLIENT


Thanks!

1
t sounds like you're running Windows but don't have PowerShell loaded, which the leiningen installer seems to expect. PowerShell is installed by default in Windows 7 but perhaps your IT folks removed it or it's not on your path. Try opening a command line shell and type powershell at the prompt - if it starts up you're golden, if not do a CD \ followed by dir /s powershell.exe and see if it's out there somewhere. If you find it add that directory to the path and try the lein install again. - Bob Jarvis - Reinstate Monica
This worked for me! Powershell just wasnt in the path: - jared-nelsen
To quote Col. John 'Hannibal' Smith: I love it when a plan comes together. :-) - Bob Jarvis - Reinstate Monica
Thanks Bob! To clarify for others, I did use the Windows installer to retrieve the self-installer jar, then ran the lein.bat for Windows available at the Leiningen home page. The windows installer can be found here: djpowell.github.io/leiningen-win-installer - jared-nelsen

1 Answers

0
votes

I would suggest downloading and installing Git Bash (aka "Git for Windows), which includes not only Git but a nice linux-like environment (a leaner version of Cygwin). At that point you will avoid any Powershell-related problems, which your error msg seems to imply.

https://git-scm.com/download/win