New to Rust - Installation Errors

Hi folks,

I'm brand new to Rust. I just tried to compile my first "Hello, World!" program based on the instructions in the book .

I am getting a fairly long error that I can't seem to debug. The first part of the error is pasted below. I have clang installed, it works for my architecture (Apple M1 silicon) and clang works fine otherwise for compiling programs in C / C++.

What might be going wrong here? Literally just followed the book instructions to install Rust.

          Undefined symbols for architecture arm64:
            "__dyld_image_count", referenced from:
                std::backtrace_rs::symbolize::gimli::resolve::h02618bbda2775629 in libstd-4f192af08beaa759.rlib(std-4f192af08beaa759.std.fcd23fca98dce159-cgu.0.rcgu.o)
            "_dispatch_semaphore_wait", referenced from:
                std::sys_common::once::queue::Once::call::h46633a880dbb450f in libstd-4f192af08beaa759.rlib(std-4f192af08beaa759.std.fcd23fca98dce159-cgu.0.rcgu.o)
            "_pthread_rwlock_rdlock", referenced from:
                std::sys::unix::locks::pthread_rwlock::RwLock::read::h5493db4c35d24165 in libstd-4f192af08beaa759.rlib(std-4f192af08beaa759.std.fcd23fca98dce159-cgu.0.rcgu.o)
            "_pthread_mutexattr_init", referenced from:
                _$LT$std..sys..unix..locks..pthread_mutex..AllocatedMutex$u20$as$u20$std..sys_common..lazy_box..LazyInit$GT$::init::he445e5ab5f32d88f in libstd-4f192af08beaa759.rlib(std-4f192af08beaa759.std.fcd23fca98dce159-cgu.0.rcgu.o)
            "_pthread_mutex_init", referenced from:
                _$LT$std..sys..unix..locks..pthread_mutex..AllocatedMutex$u20$as$u20$std..sys_common..lazy_box..LazyInit$GT$::init::he445e5ab5f32d88f in libstd-4f192af08beaa759.rlib(std-4f192af08beaa759.std.fcd23fca98dce159-cgu.0.rcgu.o)
            "__tlv_atexit", referenced from:
                std::sys::unix::thread_local_dtor::register_dtor::h5167e57262761946 in libstd-4f192af08beaa759.rlib(std-4f192af08beaa759.std.fcd23fca98dce159-cgu.0.rcgu.o)

...


          ld: symbol(s) not found for architecture arm64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

Did you install using rustup?
What are you installing rust on to (Mac OS, Linux, Windows)?

The problem will involve arm64 as indicated by the linker errors:

You might have installed rust for the wrong architecture somehow.