Search code examples
solanaanchor-solana

Error installing anchor-cli | solana | rpc port: {rpc_port} is already in use


I am trying to install anchor-cli in mac os. I followed this guide to install anchor-cli. But I am getting the following error while executing the cargo install --git https://github.com/project-serum/anchor --tag v0.24.2 anchor-cli --locked command

   Compiling anchor-cli v0.24.2 (/Users/selvam/.cargo/git/checkouts/anchor-bf03d42499b9267c/0b4c7b0/cli)
error: there is no argument named `rpc_port`
    --> cli/src/lib.rs:2211:40
     |
2211 |             "Your configured rpc port: {rpc_port} is already in use"
     |                                        ^^^^^^^^^^

error: there is no argument named `faucet_port`
    --> cli/src/lib.rs:2221:43
     |
2221 |             "Your configured faucet port: {faucet_port} is already in use"
     |                                           ^^^^^^^^^^^^^

error: could not compile `anchor-cli` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `anchor-cli v0.24.2 (https://github.com/project-serum/anchor?tag=v0.24.2#0b4c7b0c)`, intermediate artifacts can be found at `/var/folders/pr/mfnrnlh92974pfszrqmj3l940000gp/T/cargo-installAhWbj9`

solana --version solana-cli 1.9.0 (src:7782d34b; feat:378846963)

rustup --version rustup 1.23.1 (3df2264a9 2020-11-30) info: This is the version for the rustup toolchain manager, not the rustc compiler. info: The currently active rustc version is rustc 1.56.1 (59eed8a2a 2021-11-01)


Solution

  • I think your rust version is outdated. Try again after upgrading rust version.