1- if you use ubuntu you should search old rustc in /.local/share/solana and replace it with newer version.
second soloution: run "cargo build-sbf --version" and if your solana version not updated update it with "solana-install init" to "newest version"