Page 1 of 1

PermissionError when solving dependencies on Arch Linux

Posted: Thu Dec 21, 2023 8:14 pm
by kaspernyhus
Hello,

I get the following error message when trying to build blink on a fresh Arch install. Followed get-started guide. Is Python not allowed to make directories?

Thanks for any help!

Code: Select all

....Updating lock file at /home/kaspernyhus/esp/blink/dependencies.lock
Processing 2 dependencies:
[1/2] espressif/led_strip (2.5.2)
CMake Error at /home/kaspernyhus/esp/esp-idf/tools/cmake/build.cmake:540 (message):
  Traceback (most recent call last):

    File "<frozen runpy>", line 198, in _run_module_as_main
    File "<frozen runpy>", line 88, in _run_code
    File "/home/kaspernyhus/.espressif/python_env/idf5.1_py3.11_env/lib/python3.11/site-packages/idf_component_manager/prepare_components/__main__.py", line 6, in <module>
      main()
    File "/home/kaspernyhus/.espressif/python_env/idf5.1_py3.11_env/lib/python3.11/site-packages/idf_component_manager/prepare_components/prepare.py", line 131, in main
      args.func(args)
    File "/home/kaspernyhus/.espressif/python_env/idf5.1_py3.11_env/lib/python3.11/site-packages/idf_component_manager/prepare_components/prepare.py", line 31, in prepare_dep_dirs
      ).prepare_dep_dirs(
        ^^^^^^^^^^^^^^^^^
    File "/home/kaspernyhus/.espressif/python_env/idf5.1_py3.11_env/lib/python3.11/site-packages/idf_component_manager/core.py", line 101, in wrapper
      return func(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/kaspernyhus/.espressif/python_env/idf5.1_py3.11_env/lib/python3.11/site-packages/idf_component_manager/core.py", line 658, in prepare_dep_dirs
      downloaded_components = download_project_dependencies(
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/kaspernyhus/.espressif/python_env/idf5.1_py3.11_env/lib/python3.11/site-packages/idf_component_manager/dependencies.py", line 282, in download_project_dependencies
      download_path = fetcher.download()
                      ^^^^^^^^^^^^^^^^^^
    File "/home/kaspernyhus/.espressif/python_env/idf5.1_py3.11_env/lib/python3.11/site-packages/idf_component_tools/sources/fetcher.py", line 59, in download
      return self.source.download(self.component, self.managed_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/kaspernyhus/.espressif/python_env/idf5.1_py3.11_env/lib/python3.11/site-packages/idf_component_tools/sources/web_service.py", line 256, in download
      unpack_archive(file_path, self.component_cache_path(component))
    File "/home/kaspernyhus/.espressif/python_env/idf5.1_py3.11_env/lib/python3.11/site-packages/idf_component_tools/archive_tools.py", line 98, in unpack_archive
      prepare_empty_directory(destination_directory)
    File "/home/kaspernyhus/.espressif/python_env/idf5.1_py3.11_env/lib/python3.11/site-packages/idf_component_tools/file_tools.py", line 114, in prepare_empty_directory
      os.makedirs(directory)
    File "<frozen os>", line 215, in makedirs
    File "<frozen os>", line 225, in makedirs

  PermissionError: [Errno 13] Permission denied:
  '/home/kaspernyhus/.cache/Espressif/ComponentManager/service_47a9c9ba'

Call Stack (most recent call first):
  /home/kaspernyhus/esp/esp-idf/tools/cmake/project.cmake:547 (idf_build_process)
  CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the /home/kaspernyhus/esp/blink/build/log/idf_py_stderr_output_5081 and /home/kaspernyhus/esp/blink/build/log/idf_py_stdout_output_5081

Re: PermissionError when solving dependencies on Arch Linux

Posted: Fri Dec 22, 2023 7:17 am
by ESP_Roland
Perhaps you've run the build with root access before? It might help to try to remove those particular files it cannot access with "sudo rm".

Re: PermissionError when solving dependencies on Arch Linux

Posted: Fri Dec 22, 2023 7:54 am
by kaspernyhus
oh, you are probably right, removing the cached files worked. Thanks!