Error running Ngrok

I’m very new to the kali linux. However, i am having trouble running ngrok on my kali linux terminal. When I run the program, i get this error.
ngrok http 3001
Traceback (most recent call last):
File “/usr/local/lib/python3.11/dist-packages/pyngrok/”, line 101, in install_ngrok
_install_ngrok_zip(ngrok_path, download_path)
File “/usr/local/lib/python3.11/dist-packages/pyngrok/”, line 117, in _install_ngrok_zip
File “/usr/lib/python3.11/”, line 1681, in extractall
self._extract_member(zipinfo, path, pwd)
File “/usr/lib/python3.11/”, line 1735, in _extract_member
open(targetpath, “wb”) as target:
PermissionError: [Errno 13] Permission denied: ‘/usr/local/lib/python3.11/dist-packages/pyngrok/bin/ngrok’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/bin/ngrok”, line 8, in
File “/usr/local/lib/python3.11/dist-packages/pyngrok/”, line 345, in main
File “/usr/local/lib/python3.11/dist-packages/pyngrok/”, line 336, in run
File “/usr/local/lib/python3.11/dist-packages/pyngrok/”, line 81, in ensure_ngrok_installed
File “/usr/local/lib/python3.11/dist-packages/pyngrok/”, line 103, in install_ngrok
raise PyngrokNgrokInstallError(“An error occurred while downloading ngrok from {}: {}”.format(url, e))
pyngrok.exception.PyngrokNgrokInstallError: An error occurred while downloading ngrok from [Errno 13] Permission denied: ‘/usr/local/lib/python3.11/dist-packages/pyngrok/bin/ngrok’
Can someone tell me what this means.

As a user you cannot, and do not want to, write files into the operating system typically.

Find out how to tell the installer where to put its files.