Board Installation stops with error 13 - access denied

When trying to install esp32 as an admin in the Arduino IDE I get an internal error

Error: 13 INTERNAL: Cannot install tool esp32:riscv32-esp-elf-gcc@gcc8_4_0-esp-2021r2-patch3: moving extracted archive to destination dir: rename C:\Users\Knut\AppData\Local\Arduino15\tmp\package-1577178718\riscv32-esp-elf c:\Users\Knut\AppData\Local\Arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\gcc8_4_0-esp-2021r2-patch3: Access is denied.

I run this a couple of times, making sure I am admin. i also checked the directories. they look fine. There should not be any access problem.

I have also tried to install other boards. That stopped with the same issue.

Any help is much appreciated.

Hi @knherzog. This error is often caused by interference from your antivirus software.

Any experiment you can try is :warning: TEMPORARILY :warning: disabling your antivirus for a single installation to see if the problem goes away, then turn the antivirus back on.

If the problem doesn't occur with the antivirus off you will need to adjust the settings of your antivirus to put the appropriate file, folder, or process on the "allow list" so it doesn't interfere with compilation.

:warning: Please be cautious about working without an antivirus. This is only about temporarily disabling it for a quick test. If you don't feel comfortable doing that, fine. You can try going straight to configuring the antivirus to not interfere with the Arduino software.


I'm happy to say that an improvement was made recently which should cause the IDE to be more resilient to this type of interference:

However, that improvement hasn't propagated into an Arduino IDE build yet, so it won't be of immediate assistance.

1 Like

Yes, that solved the issue. Thanks for the quick help.

You are welcome. I'm glad it is working now. Thanks for taking the time to post an update!

Regards,
Per

Good Morning:
I downloaded the latest IDE yesterday (and donated). I have been trying to install the IDE ever since. I have been having the same problem and I am on the verge of giving up in abject despair.

Error: 13 INTERNAL: Cannot install tool arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7: moving extracted archive to destination dir: rename C:\Users\Mark\AppData\Local\Arduino15\tmp\package-689175940\avr c:\Users\Mark\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7: Access is denied.

I followed the link to github that you provided but I am having trouble understanding exactly what I am supposed to copy to where.

The source directory in the failed "rename" operation:
C:\Users\Mark\AppData\Local\Arduino15\tmp\package-689175940\avr
does not exist. In fact, when I come to:
C:\Users\Mark\AppData\Local\Arduino15\tmp
That is as far as it goes. There is nothing in this directory.

Any further advice is appreciated.
Mark

Have you stopped your antivirus during the install?
Manual copying won't help.

My system has been set up to not allow me to disable anti-virus.
Mark

Hi @markcdn

The link was more intended to share that progress is being made in this area, rather than with the expectation that users would manually apply that change to their IDE. However, that is possible if you want.

A tester build of Arduino IDE that uses the latest version of Arduino CLI happens to be available for download right now. This tester build offers the easiest way to get the fix I mentioned in my previous comment.

I'll provide instructions you can follow to download that tester build:

Hi again. A developer investigated the problem and identified a potential cause.

A fix has been prepared, but unfortunately we were never able to reproduce the fault despite quite some attempts. So we are hoping that you might be willing to help us out by testing the fix and letting us know whether the error still occurs.

Everyone is welcome to test, but the most conclusive results will be in the case where the error is produced reliably with the regular production version of the software. So please first test with Arduino IDE 2.0.1 (or the latest nightly build of Arduino IDE if you prefer) to make sure you are able to reproduce the error.

I'll provide the instructions for getting the tester build of Arduino IDE that has the proposed fix:

  1. Sign in to your GitHub account.
    (GitHub only allows downloads of the tester builds when you are signed in.)
  2. Open this page in your browser:
    https://github.com/arduino/arduino-ide/actions/runs/3444944271#artifacts
  3. Click the "Windows_X86-64_zip" link under the "Artifacts" section of the page.
  4. Wait for the download to finish.
  5. Extract or install the downloaded file as usual.
  6. Start the tester build of Arduino IDE you downloaded.

Please let me know whether the problem still occurs when you use that tester build.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.