Error in installation ERPNext

I have Macbook m1 and trying installing ERPNext from 2 monthes always failed

—my first problem. when editing. MariaDB configuration file.

can’t save

----my second problem.
after excuting
pip3 install frappe-bench

installed well

but when
excute bench --version

zsh: command not found: bench

any help plz

Have you tried following the installation instruction here

or here

once bench is installed you can then proceed with erpnext

I am already using that link to install

You have to edit the cnf file using sudo like below because you are putting it inside the /etc folder and not the /usr folder as mentioned in the installation instruction.

sudo nano /etc/mysql/my.cnf

try checking your bench version inside the frappe-bench folder or the $PATH is not mentioned in the ~/.bash_profile or whatever shell you are using.