You can detailed guide on https://solana.com/docs/intro/installation/dependencies
So the correct thing is cargo install --git https://github.com/solana-foundation/anchor avm --force
cargo install --git https://github.com/solana-foundation/anchor avm --force