Fork me on GitHub
#clojure
<
2023-07-09
>
braai engineer10:07:18

Trying & failing to install Clojure on a fresh x86 EC2 machine running base Ubuntu. Getting the error, "formula cannot be installed from bottle":

$ brew install clojure/tools/clojure
Running `brew update --auto-update`...
==> Fetching dependencies for clojure/tools/clojure: rlwrap, libyaml, gperf and ruby
==> Fetching rlwrap
...
==> Fetching clojure/tools/clojure
==> Downloading 
Already downloaded: /home/ubuntu/.cache/Homebrew/downloads/a68761ec23820e70ffbd2daae161b8c27c9f5e4e4ea58ee69259a4fcca15804e--clojure-tools-1.11.1.1347.tar.gz
==> Installing clojure from clojure/tools
Error: The following formula cannot be installed from bottle and must be
built from source.
  clojure
Install Clang or run `brew install gcc`.
Tried reinstalling gcc but no dice. Any ideas?

braai engineer10:07:16

Managed to get it working with the Linux install script: https://clojure.org/guides/install_clojure#_linux_instructions

pppaul17:07:32

why are you using brew on a linux server? isn't that for macs?

pppaul19:07:10

i haven't seen brew be recommending way of installing any piece of software to date, other than on macs.

pppaul19:07:36

ubuntu basically has per software install instructions, you gotta follow those for every app/lib you install

pppaul19:07:59

apt will have out of date stuff, snap has it's own issues (sometimes it's good enough). and most systems require docker or a custom install script that they provide

Ed20:07:00

I would use the install script probably from an ansible playbook or something like that for setting up an ec2 server. AWS has support for that with SSM ...

Ed20:07:47

I've had some bad experiences with brew ... I would probably avoid that if I could

braai engineer14:07:19

@U0LAJQLQ1 because it's recommended on the official Clojure installation instructions: https://clojure.org/guides/install_clojure#_linux_instructions

pppaul23:07:56

wow, I've never heard of Linux brew before. is it different from home brew? is this a new install guide? I don't remember seeing it when I installed clojure on my servers

pppaul23:07:44

guess it's something I have to look into.