vmware-tanzu / tanzu-cli

The Tanzu Core CLI project provides the core functionality of the Tanzu CLI. The CLI is based on a plugin architecture where CLI command functionality can be delivered through independently developed plugin binaries
Apache License 2.0
33 stars 21 forks source link

Documentation does not mention you need Rosetta on ARM Mac #774

Closed jeroenvermeulen closed 3 months ago

jeroenvermeulen commented 3 months ago

Bug description Documentation does not mention you need Rosetta on ARM Mac

Expected behavior Documentation should mention for ARM Macs (M1/M2/M3) you need to execute:

softwareupdate --install-rosetta --agree-to-license

Steps to reproduce the bug / Relevant debug output If you did not install Rosetta, installing plugins will fail with error bad CPU type in executable:

$ tanzu plugin list
[i] The tanzu cli essential plugins have not been installed and are being installed now. The install may take a few seconds.
[i] Installing plugins from plugin group 'vmware-tanzucli/essentials:v1.0.0'
[x] Failed to install plugin 'telemetry:v1.1.0' with target 'global'
[!] unable to install plugin 'telemetry': could not describe plugin "telemetry": fork/exec /Users/jeroenv/Library/Application Support/tanzu-cli/telemetry/v1.1.0_a93519154dc71368d738aec09f9bc964a0c3bcd02a856106ccaddaaf31426636_global: bad CPU type in executable

It took me quite a while to figure out what the problem was.

Output of tanzu version

$ tanzu version
version: v1.3.0
buildDate: 2024-05-09
sha: d59f47c8
arch: arm64

Environment where the bug was observed (cloud, OS, etc)

$  uname -a
Darwin Jeroens-MacBook-Pro.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103 arm64
$ sysctl -a | grep brand
machdep.cpu.brand_string: Apple M1
marckhouzam commented 3 months ago

Sorry you ran into trouble @jeroenvermeulen. I thought Rosetta was standard on all ARM64 Macs. Thanks for reporting, it will help others. I’ll add it to the documentation.

marckhouzam commented 3 months ago

@jeroenvermeulen Could you have a look at #776 to tell me if the proposed documentation is clear enough from your point of view?