Error: No Override and No Default Toolchain

If you encounter an error - error: no override and no default toolchain set or error: no default toolchain configured , use this

rustup install stable
rustup default stable