Sudo: bench: command not found 2023

Hi,
am facing an issue here.
am trying to setup let’s encrypt in my system which is a multi tenant but when I do,
sudo -H bench setup letsencrypt [sitenanme am getting

sudo: bench: command not found

I have tried all options on the solution at forum but am not getting the answerer. what can I do without reinstalling the erpnext.

I faced the same problem before. What I did was adding the path to my virtual environment bin/ to the secure path after running sudo visudo. You should be able to use bench command with sudo after that

1 Like

Are you in your frappe-bench folder?

Like

cd frappe-bench

Yes.
I solved this by reinstalling it again

1 Like