Cannot install realm-cli on Amazon Linux 2023 (aarch64) - not supported?

According to the product matrix at https://www.mongodb.com/docs/manual/administration/production-notes/#platform-support-matrix Amazon Linux 2023 supports both Community and Enterprise editions of MongoDB 7.0 on arm64. However, I’m unable to install realm-cli on Amazon Linux 2023, with the error failed to download Realm CLI: Error: Only Linux 64 bits supported. My architecture is aarch64 (arm64).

OS Version: Amazon Linux 2023.2.20231026 (rpm -q system-release)
OS Architecture: aarch64 (uname -m)
Node Version: v20.9.0 (node -v)
Node Architecture: arm64 (node -p "process.arch")
NPM Version: 10.1.0 (npm -v)

Installation Command: sudo npm install -g mongodb-realm-cli

Output:

npm ERR! code 1
npm ERR! path /usr/lib/node_modules/mongodb-realm-cli
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! failed to download Realm CLI: Error: Only Linux 64 bits supported.
npm ERR!     at getDownloadURL (/usr/lib/node_modules/mongodb-realm-cli/install.js:24:13)
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-11-01T16_32_51_933Z-debug-0.log

Log snippet:

100 timing command:install Completed in 1600ms
101 verbose stack Error: command failed
101 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
101 verbose stack     at ChildProcess.emit (node:events:514:28)
101 verbose stack     at maybeClose (node:internal/child_process:1105:16)
101 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
102 verbose pkgid mongodb-realm-cli@2.6.2
103 verbose cwd /home/ec2-user
104 verbose Linux 6.1.55-75.123.amzn2023.aarch64
105 verbose node v20.9.0
106 verbose npm  v10.1.0
107 error code 1
108 error path /usr/lib/node_modules/mongodb-realm-cli
109 error command failed
110 error command sh -c node install.js
111 error failed to download Realm CLI: Error: Only Linux 64 bits supported.
111 error     at getDownloadURL (/usr/lib/node_modules/mongodb-realm-cli/install.js:24:13)
111 error     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
112 verbose exit 1
113 timing npm Completed in 1871ms

Ok, was able to build it from source for anyone else running into this.

git clone git@github.com:10gen/realm-cli.git
go build -v -o realm-cli main.go
1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.