Getting this error while Installing ERPNext using Bench

hi all,

getting this error while Installing ERPNext using Bench

pls help

lmc@lmc-HP-Pro-3330-MT:/opt/bench$ bench init erpnext
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/opt/bench/bench-repo/bench/”, line 40, in cli
File “/usr/local/lib/python2.7/dist-packages/click/”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/bench/bench-repo/bench/commands/”, line 30, in init
python = python)
File “/opt/bench/bench-repo/bench/”, line 54, in init
File “/usr/lib/python2.7/”, line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: 'erpnext

sounds like a permission problem. What user are you using when running “bench init erpnext” and what directories are you in?

On my installation after running the easiy install script I also had to make a “chown -R frappe .config”

Did you install with the easy isntall script using sudo and are now logged in as user frappe?


You should not be in the option bench directory but in the user directory usually “frappe”.

Try to follow this:

I think you’ve already installed frappe-bench.
You probably ran something like this

bench init frappe-bench --frappe-branch master && cd frappe-bench

To add erpnext, the commands are

bench new-site site1.local
bench start

then you’d add (as user frappe)

cd frappe-bench
bench get-app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch master
bench --site site1.local install-app erpnext
bench start

thanks for the reply ,
it works ,
but got this new error

lmc@lmc-HP-Pro-3330-MT:~$ sudo apt -y install nginx nodejs redis-server
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

That error implies that you or another user has an update/install process running. Maybe you have something like synaptic running?

@trentmu oky let me chk

Sorry, I’ve been scouring the net for information about the issue I’m having and keep finding my way back to this post. A bit surprised this is the only post related to my issue but…

At any rate, I have installed ERPNext version 12 but then attempted to upgrade to version 13. Somehow now, after the upgrade, when I access my site I see Frappe instead of ERPNext.

Attempting to install ERPNext confirms that I already have it installed.

So…my question is…how can I change settings (Bench?) to serve ERPNext instead of Frappe?

Any help/advice you can provide will be very much appreciated.

You can try a manual install using this sequence for ubuntu or this one for debian (I prefer debian)


Thanks. I should have commented back here but I finally managed to get everything in order. Unfortunately, I’ve now forgotten exactly what I did to get there. :-0 I think I reinstalled ERPNext and that was what got me going.