Fork me on GitHub

This is probably too far off the beaten path to matter to anyone, but I noticed recently that Homebrew is also supported on Linux and Windows with WSL, and so tried out 'brew install clojure' on a Linux system. It seems to set things up in a way that is problematic for clojure finding the system-wide deps.edn file. I know there is the clojure install script for Linux, which is what I have always used before today, and will continue to do so. Just wanted to point this out in case anyone else tries it.


What’s the actual problem you saw? clojure actually no longer needs that file


After brew install clojure completed with no apparent problems, I tried clojure -Sdescribe and got this message, which at the time stopped me from further experimentation:

$ clojure -Sdescribe
cp: cannot stat 'PREFIX/example-deps.edn': No such file or directory
but I can try other things if you think it would be useful to know.


A kind of unusual thing I noted about the results after brew install clojure completed was that Homebrew creates a /home/linuxbrew/.linuxbrew directory, where linuxbrew is a new directory, not the name of any user account on the machine, and puts all (or at least the ones I have seen) brew-installed files inside of that dir.


Comparing to my works-better macOS install via brew install clojure earlier, it appears that the Linux clojure shell script has one occurrence of PREFIX that is not replaced with the install directory.


I see what happened -- I tried this on an Ubuntu Linux system with minimal install, and it had no ruby executable installed. brew install clojure's script uses ruby to replace occurrences of the string PREFIX with the install dir. That step of script failed, leaving the clojure shell script in its original unmodified form.


sudo apt-get install ruby, brew uninstall clojure, then brew install clojure made the install go better.


Strange that the Homebrew install went well without installing ruby itself.


I thought brew used Ruby to do pretty much everything?


Perhaps the clojure recipe needs to be updated to explicitly state ruby is a dependency?


(I assume brew can be used to install ruby?)