solana: command not found

Viewed 4747

I am trying to build my validator for Solana. I installed Solana on the main user. I created another user to restrict the access to sudo. I can run the Solana command from my main user but on the limited user it says command not found. does anybody know what is the problem?

1 Answers

The Solana install tool sets everything up in $HOME/.local/share/solana/install/active_release/bin and adds that directory to your $PATH in .profile. This directory is not in your other user's path, so it is inaccessible to the other user.

To solve this, you can:

  • redo the install steps as your other user

Or

  • add your main user's $HOME/.local/share/solana/install/active_release/bin to your other's $PATH, ie:
export PATH="/home/$MAIN_USER_NAME/.local/share/solana/install/active_release/bin:$PATH"

where $MAIN_USER_NAME is the name of the user that has installed the Solana tools.

Also, you can double-check the existing installation by running which solana as the main user.

Related