'Unable to run graalvm gu command on mac

I have installed graalvm on mac, and I see gu utility in /bin folder of the installation directory. When I try to run a gu command inside /bin folder, like

gu install native-image

I get message:

zsh: command not found: gu

What am I missing here?



Solution 1:[1]

You are missing the path. Try:

./gu install native-image

Solution 2:[2]

You have to add the following in your .bashrc or .profile

 export PATH=/Library/Java/JavaVirtualMachines/<graalvm>/Contents/Home/bin:$PATH

You may missed it during the installation procedure. For complete guide, please check official installation instruction

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 BoriS
Solution 2 Ratul Sharker