idf installation - Installation has failed with exit code 1

wesS2020
Posts: 7
Joined: Thu Mar 25, 2021 5:31 am

idf installation - Installation has failed with exit code 1

Postby wesS2020 » Fri Feb 04, 2022 11:10 pm

I had a previous version of idf installed and working with eclipse plugin for a long time. Yesterday, I have decided to install the latest version of idf v4.4.
I am using esp-idf-tools-setup-online-2.13.exe to install it.
I have tried to install it in different folders but always get "Installation has failed with exit code 1".
Below is part of the installation log file:
Extracting C:\Espressif\dist\cmake-3.20.3-windows-x86_64.zip to C:\Espressif\tools\cmake\3.20.3
WARNING: Rename C:\Espressif\tools\cmake\3.20.3 to C:\Espressif\tools\cmake\3.20.3.tmp failed, retrying...
WARNING: Rename C:\Espressif\tools\cmake\3.20.3 to C:\Espressif\tools\cmake\3.20.3.tmp failed, retrying...
WARNING: Rename C:\Espressif\tools\cmake\3.20.3 to C:\Espressif\tools\cmake\3.20.3.tmp failed, retrying...
Traceback (most recent call last):
File "C:\Espressif\frameworks\esp-idf\\tools\idf_tools.py", line 1828, in <module>
main(sys.argv[1:])
File "C:\Espressif\frameworks\esp-idf\\tools\idf_tools.py", line 1824, in main
action_func(args)
File "C:\Espressif\frameworks\esp-idf\\tools\idf_tools.py", line 1468, in action_install
tool_obj.install(tool_version)
File "C:\Espressif\frameworks\esp-idf\\tools\idf_tools.py", line 738, in install
strip_container_dirs(dest_dir, self._current_options.strip_container_dirs) # type: ignore
File "C:\Espressif\frameworks\esp-idf\\tools\idf_tools.py", line 396, in strip_container_dirs
rename_with_retry(path, tmp_path)
File "C:\Espressif\frameworks\esp-idf\\tools\idf_tools.py", line 382, in rename_with_retry
os.rename(path_from, path_to)
PermissionError: [WinError 5] Access is denied: 'C:\\Espressif\\tools\\cmake\\3.20.3' -> 'C:\\Espressif\\tools\\cmake\\3.20.3.tmp'
2022-02-05 09:34:47.918 --------
2022-02-05 09:34:47.918 Message box (OK):
Installation has failed with exit code 1
I have tried many time and nothing changed.
Now I am left without idf and can't work on my project.

I would appreciate any help.

wesS2020
Posts: 7
Joined: Thu Mar 25, 2021 5:31 am

Re: idf installation - Installation has failed with exit code 1

Postby wesS2020 » Fri Feb 04, 2022 11:30 pm

Finally I fixed this issue.
To do that I had to disable McAfee antivirus protection. Then installation completed OK.

ESP_georgik
Posts: 21
Joined: Fri Nov 06, 2020 8:23 am
Location: Brno
Contact:

Re: idf installation - Installation has failed with exit code 1

Postby ESP_georgik » Mon Feb 07, 2022 9:28 am

The problem is caused by the antivirus blocking rename operation of the directory with cmake after extraction from ZIP archive.

Options:
- disable antivirus scanning for the time-being
- use one of Offline installers which extracts CMake directly to desired location - https://github.com/espressif/idf-instal ... -installer
- rename cmake.tmp directory to cmake and retry the installation process
- Juraj Michálek
Senior Embedded Software Engineer at Espressif Systems

Who is online

Users browsing this forum: No registered users and 397 guests