user3761555
user3761555

Reputation: 1265

solana install on Ubuntu - where is it installed to?

I tried to follow steps both a. https://docs.solana.com/cli/install-solana-cli-tools

(base) xxx@xxx:~/dev/nft/metaplex/metaplex/js/packages/cli$ sudo sh -c "$(curl -sSfL https://release.solana.com/v1.8.1/install)"
                                                           [sudo] password for xxx: 
                                                           downloading v1.8.1 installer
                                                           Install is up to date. 
                                                           1.8.1 is the latest compatible release

                                                           Please update your PATH environment variable to include the solana programs:
                                                             PATH="/root/.local/share/solana/install/active_release/bin:$PATH"

I updated $PATH, but no joy. I got no installation error but command prompt can't find solana.

b. I then also tried steps here https://snapcraft.io/install/solana/ubuntu#install

(base) xxx@xxx:~/.local/share$ sudo snap install solana --beta --devmode
                               solana (beta) 0+git.ca12fac from Michael Vines (mvines) installed
(base) xxx@xxx~/.local/share$ solana --version
                               solana: command not found

Where was solana installed to actually? I can't find it.

Upvotes: 1

Views: 6231

Answers (2)

Guorong
Guorong

Reputation: 46

I think the issue comes from that you updated the $PATH variable in wrong location.

In many cases, we have two options /home/[username]/.bashrc and /home/[username]/.profile to update the $PATH variable.

When I was installing solana tool suite, I updated the /home/[username]/.profile. In other word, I inserted export PATH="/home/[username]/.local/share/solana/install/active_release/bin:$PATH" at the end of .profile. And it worked.

I think you should try this way if you didn't yet.

About the options of terminals(bash, etc) and $PATH variable, I recommend to take a look at Where is PATH variable set in Ubuntu?

Upvotes: 1

Jon C
Jon C

Reputation: 8432

Typically, the setup script that you ran in the first step installs the solana CLI in $HOME/.local/share/solana/install/active_release/bin/ and then adds it to your PATH in $HOME/.profile.

As an easy fix, you can logout and log back in to pick up the change.

Upvotes: 3

Related Questions