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/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/bench/bench-repo/bench/commands/make.py”, line 30, in init
python = python)
File “/opt/bench/bench-repo/bench/utils.py”, line 54, in init
os.makedirs(path)
File “/usr/lib/python2.7/os.py”, line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: 'erpnext

Hi!
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?

@doca
@rmehta
@saifi0102

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

@trentmu
@doca
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)

trentmu,

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.

Cheers