When attempting to run "tanzu plugin install" command on an alpine-based container the following error message is given.
$ tanzu plugin install --target kubernetes namespaces
[i] Installing plugin 'namespaces:v1.4.0' with target 'kubernetes'
[x] : could not describe plugin "namespaces": fork/exec /home/kube/.local/share/tanzu-cli/namespaces/v1.4.0_xyz_kubernetes: no such file or directory
The referenced plugin binary file is existing and has executable permissions. The "no such file or directory" error does not make sense in this situation because the file is confirmed to be existing.
$ ls -l /home/kube/.local/share/tanzu-cli/namespaces/v1.4.0_xyz_kubernetes
-rwxr-xr-x 1 kube kube 16310532 Mar 6 11:50 /home/kube/.local/share/tanzu-cli/namespaces/v1.4.0_xyz_kubernetes
VMware Tanzu Application Platform
Tanzu CLI
The particular plugin binary was compiled in a Linux machine that has the GNU libc library. That made the binary dependent on the said library that is not available in a standard Alpine machine, which is using the musl libc library instead.
Install and use the tanzu CLI in a supported Linux distribution such as Ubuntu, Debian, or RHEL. See the doc on "Installing and Using VMware Tanzu CLI v1.5.x".