Nick
Nick

Reputation: 9051

cannot start cassandra on Mac M1

Arch: Apple M1
OS: Mac 13.0.1
Java: 17
Cassandra: 4.1

I tried two way to install Cassandra on Mac:

  1. homebrew
  2. download the apache-cassandra-4.1.0-bin.tar.gz from official website

When I try to run cassandra, I got the following error:

dyld[29837]: terminating because inserted dylib '/usr/local/lib/libjemalloc.dylib' could not be loaded: tried: '/usr/local/lib/libjemalloc.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need '')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libjemalloc.dylib' (no such file), '/usr/local/lib/libjemalloc.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need '')), '/opt/homebrew/Cellar/jemalloc/5.3.0/lib/libjemalloc.2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need '')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/jemalloc/5.3.0/lib/libjemalloc.2.dylib' (no such file), '/opt/homebrew/Cellar/jemalloc/5.3.0/lib/libjemalloc.2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need ''))
dyld[29837]: tried: '/usr/local/lib/libjemalloc.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need '')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libjemalloc.dylib' (no such file), '/usr/local/lib/libjemalloc.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need '')), '/opt/homebrew/Cellar/jemalloc/5.3.0/lib/libjemalloc.2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need '')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/jemalloc/5.3.0/lib/libjemalloc.2.dylib' (no such file), '/opt/homebrew/Cellar/jemalloc/5.3.0/lib/libjemalloc.2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need ''))
Error parsing arguments! Unknown argument ""

Supprisingly, cqlsh works. It can be used to connect to other cassandra server.

It seems libjemalloc.dylib is not correct. It is confusing to see (have 'arm64', need '') What should I do?

Upvotes: 1

Views: 536

Answers (1)

Aaron
Aaron

Reputation: 57748

Cassandra 4.1 will run on a maximum JDK version of 11. Java 17 will not work; you’ll need to downgrade.

Upvotes: 1

Related Questions