I'm trying to install clojure from the official installer for once, instead of my old "install lein from apt" method -- I wanted the official tool CLIs.
$ curl -L -O https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh
(completes)
$ chmod u+x linux-install.sh
$ ./linux-install.sh --prefix "$HOME/.local"
Downloading and expanding tar
clojure-tools-1.12.5.1654.tar.gz: OK
Installing libs into /home/fgabolde@/.local/lib/clojure
Installing clojure and clj into /home/fgabolde@/.local/bin
sed: -e expression #1, char 25: unknown option to `s'
Undeterred, I go back to the docs and find a "POSIX" installer. Aha! That must be it. The other installer assumed something about my shell environment and this one must be written to POSIX specs and that will fix everything!
I download posix-installer.sh, do the same dance, and exactly the same happens.
At this point I remember that when this machine was provisioned, IT made a typo and my homedir is /home/fgabolde@ for no good reason. This has tripped up other programs before. And indeed, the sed invocations in the install script use @ as a delimiter, so my weird homedir terminates the replacement string early.
I fixed it by changing the delimiters in the install script and rerunning.