I have an extremely frustrating error message that I am getting in Arduino-CLI only, see below. There are other posts on this specific "unable to rename" core.a file and many others have suggested ignoring Arduino under the anti virus settings, but my situation is slightly different. The sketch compiles just fine in Arduino and the error is only occurring in Arduino-cli. Hoping someone out there has seen this before
unable to rename 'C\Users**\AppsData\Local\Temp\arduino\sketches\5513632BBDAB7F9AA526EB784168385F\core\core.a'; reason: File exists
Your topic has been moved to the dedicated CLI section of the forum.
Did you try to manually delete the file? Does the problem come back after that?
You can safely delete anything in the directory ' C\Users**\AppsData\Local\Temp\arduino\sketches'; it's the cache. So I suggest that you delete the '5513632BBDAB7F9AA526EB784168385F' directory.
This is a custom built board, but I am programming it using Arduino-ESP32 by Espressif Systems. The board I am using to compile the sketch is the ESP32 Wrover Module. It happens maybe 90% of the time. The command in arduino-cli is arduino-cli compile -b esp32:esp32:esp32wrover -v
I had this working on my computer a few months months ago and I was able to compile this sketch and upload it to about 20 different boards over the last year on and off. I think the most helpful piece to all of this is that it compiles in Arduino, but it does not compile in arduino-cli. Thanks for your help.