"cargo install trunk" failing

PS D:\Documents\Rust\hello_www> cargo install trunk         
    Updating crates.io index
  Installing trunk v0.16.0
   Compiling proc-macro2 v1.0.44
// Long list of compiling 
   Compiling heck v0.4.0
   Compiling rayon-core v1.9.3
   Compiling rustls v0.20.6
// Rest of the compiling
   Compiling bzip2-sys v0.1.11+1.0.8                                                                                                               
error: failed to run custom build command for `rayon-core v1.9.3`                                                                                                          

Caused by:
  could not execute process `C:\Users\dev\AppData\Local\Temp\cargo-installHK7ErK\release\build\rayon-core-9f2d274496fcf687\build-script-build` (never executed)

Caused by:
  The process cannot access the file because it is being used by another process. (os error 32)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `trunk v0.16.0`, intermediate artifacts can be found at `C:\Users\dev\AppData\Local\Temp\cargo-installHK7ErK`  

I've tried multiple times; each time generates a different file path.
I've also reinstalled Rust and tried immediately after restarting the PC. Using Windows 11.

Anyone have any ideas of how to get this to work?
Thank you.

Could be an antivirus interfering. Do the problematic files end up in quarantine, for example?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.