Fork me on GitHub

When starting cursive I get this error:

com.intellij.execution.ExecutionException: Cannot execute: Could not find :version in command output when executing /usr/local/bin/clojure
And I get zero results when searching for this error message 😬 – any suggestions?


I can’t reproduce this, sorry. What do you get if you run clojure -Sdescribe?


No worries 🙂 Here’s the output:

❯ clojure -Sdescribe
{ version ""
  config-files ["/usr/local/Cellar/clojure/" "/Users/thomas/.clojure/deps.edn" ]
  config-user "/Users/thomas/.clojure/deps.edn"
  config-project "deps.edn"
  install-dir "/usr/local/Cellar/clojure/"
  config-dir "/Users/thomas/.clojure"
  cache-dir "/Users/thomas/.clojure/.cpcache"
  force false
  repro false
  main-aliases ""
  repl-aliases ""}


Here’s what I see:

~/d/cursive (master)> clojure -Sdescribe
{:version ""
 :config-files ["/opt/homebrew/Cellar/clojure/" "/Users/colin/.clojure/deps.edn" "deps.edn" ]
 :config-user "/Users/colin/.clojure/deps.edn"
 :config-project "deps.edn"
 :install-dir "/opt/homebrew/Cellar/clojure/"
 :config-dir "/Users/colin/.clojure"
 :cache-dir ".cpcache"
 :force false
 :repro false
 :main-aliases ""
 :repl-aliases ""}


See how your keys are symbols rather than keywords? I think that’s the problem, but I have no idea why that would happen.


If you’re not sure why that might be happening, it would be worth asking over in #C6QH853H8


@U06DX1ANS i would probably upgrade or reinstall homebrew, because that's a bit suspicious, that your built-in deps.edn file is under /usr/local/ and not under /usr/homebrew/. alternatively, i'd recommend using Nix instead of homebrew for managing non-GUI apps, because it yields in more reproducible environments. u can even have multiple environments side-by-side, without affecting each other and it's also completely isolated from your homebrew installation or the built-in macOS programs. just install with

sh <(curl -L ) --daemon
as described in (the install script explains very precisely what it will do and why) then, in a newly opened terminal window, either try clojure temporarily with:
nix-shell -p clojure
which will downloads Clojure CLI tools for the 1st time, then starts a new bash shell, where clojure is on your PATH:
[nix-shell:~]$ clojure -Sdescribe
{:version ""
 :config-files ["/nix/store/q6sxn9lcb5rj5b7rhrwqsk9p8fhr63xp-clojure-" "/Users/onetom/.clojure/deps.edn" ]
 :config-user "/Users/onetom/.clojure/deps.edn"
 :config-project "deps.edn"
 :install-dir "/nix/store/q6sxn9lcb5rj5b7rhrwqsk9p8fhr63xp-clojure-"
 :config-dir "/Users/onetom/.clojure"
 :cache-dir "/Users/onetom/.clojure/.cpcache"
 :force false
 :repro false
 :main-aliases ""
 :repl-aliases ""}
or you can install it in a way, that's it's always available for your user:
nix-env -iA nixpkgs.clojure
then remove with
nix-env -e clojure
in case u want the homebrew version found first on your PATH again.


IIRC (it’s been a while) I think brew on Intel installs binaries, at least, to /usr/local. I might be wrong on that, though.


yes, symlinks are put in /usr/local/bin


I’ve been using nix too, but not on macOS 🙂


FYI, the problem was that I was using the default bash on macOS. The script behaves differently on a more recent one.

👍 1

Glad you found the answer! That was very weird indeed.


I’ve tried both stable and EAP. This is macOS btw.

❯ clojure --version
Clojure CLI version
❯ which clojure