Fool proof install - step by step

folks thank you for assistance so far… manual installs to date seem to go ok until the bench install which seems to have a permission issue…

root@p10erp2:~# sudo mkdir -p /opt/erpnext
root@p10erp2:~# sudo chown -R erpnext /opt/erpnext/
root@p10erp2:~# cd /opt/erpnext
root@p10erp2:/opt/erpnext# git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps bench-repo^C
root@p10erp2:/opt/erpnext# whoami
root
root@p10erp2:/opt/erpnext# su - erpnext
erpnext@p10erp2:~$ cd /opt/erpnext
erpnext@p10erp2:/opt/erpnext$ git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps bench-repo
Cloning into ‘bench-repo’…
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (41/41), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 6479 (delta 19), reused 15 (delta 3), pack-reused 6438
Receiving objects: 100% (6479/6479), 29.78 MiB | 5.41 MiB/s, done.
Resolving deltas: 100% (4165/4165), done.
warning: unable to access ‘/home/erpnext/.config/git/attributes’: Permission denied
erpnext@p10erp2:/opt/erpnext$

sudo chown -R erpnext:erpnext /home/erpnext

and then try your other commands again

yep thats good, thank you trentmu… a fairly obvious one but i was loathed to start messing with an install im not confident with!

i get another permission complaint… re-ran pip as suggested with sudo -H

erpnext@p10erp2:/opt/erpnext/bench-repo$ sudo chown -R erpnext:erpnext /home/erpnext
[sudo] password for erpnext:
erpnext@p10erp2:/opt/erpnext/bench-repo$ set -o vi
erpnext@p10erp2:/opt/erpnext/bench-repo$ git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps bench-repo
Cloning into ‘bench-repo’…
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (41/41), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 6479 (delta 19), reused 15 (delta 3), pack-reused 6438
Receiving objects: 100% (6479/6479), 29.78 MiB | 5.30 MiB/s, done.
Resolving deltas: 100% (4165/4165), done.
erpnext@p10erp2:/opt/erpnext/bench-repo$ sudo pip install -e bench-repo
The directory ‘/home/erpnext/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/home/erpnext/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Obtaining file:///opt/erpnext/bench-repo/bench-repo
Collecting Click (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl (81kB)
100% |████████████████████████████████| 81kB 2.4MB/s
Collecting GitPython==2.1.11 (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/fe/e5/fafe827507644c32d6dc553a1c435cdf882e0c28918a5bab29f7fbebfb70/GitPython-2.1.11-py2.py3-none-any.whl (448kB)
100% |████████████████████████████████| 450kB 1.2MB/s
Collecting honcho (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/12/c2/95faf9e062e37f50fb685972692395bef019a554c08447282a81e35bf031/honcho-1.0.1-py2.py3-none-any.whl
Collecting jinja2 (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl (125kB)
100% |████████████████████████████████| 133kB 3.7MB/s
Collecting python-crontab (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/bc/03/852f9c5f8da7f58abce06fe8ae769cbcf6502f1c60684b16bad72ffcced3/python-crontab-2.4.0.tar.gz (50kB)
100% |████████████████████████████████| 51kB 4.8MB/s
Collecting requests (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB)
100% |████████████████████████████████| 61kB 6.8MB/s
Collecting semantic_version (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/0f/3b/8fee26649a86c71df159ed0ae7ac5f9ac38829bccd8a7404e116f903929b/semantic_version-2.8.2-py2.py3-none-any.whl
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from bench==4.1.0)
Collecting virtualenv (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/c5/97/00dd42a0fc41e9016b23f07ec7f657f636cb672fad9cf72b80f8f65c6a46/virtualenv-16.7.7-py2.py3-none-any.whl (3.4MB)
100% |████████████████████████████████| 3.4MB 226kB/s
Collecting gitdb2>=2.0.0 (from GitPython==2.1.11->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/03/6c/99296f89bad2ef85626e1df9f677acbee8885bb043ad82ad3ed4746d2325/gitdb2-2.0.6-py2.py3-none-any.whl (63kB)
100% |████████████████████████████████| 71kB 6.8MB/s
Collecting MarkupSafe>=0.23 (from jinja2->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/fb/40/f3adb7cf24a8012813c5edb20329eb22d5d8e2a0ecf73d21d6b85865da11/MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl
Collecting python-dateutil (from python-crontab->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl (226kB)
100% |████████████████████████████████| 235kB 2.3MB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/e0/da/55f51ea951e1b7c63a579c09dd7db825bb730ec1fe9c0180fc77bfb31448/urllib3-1.25.6-py2.py3-none-any.whl (125kB)
100% |████████████████████████████████| 133kB 2.9MB/s
Collecting certifi>=2017.4.17 (from requests->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl (154kB)
100% |████████████████████████████████| 163kB 2.9MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 2.6MB/s
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python2.7/dist-packages (from requests->bench==4.1.0)
Collecting smmap2>=2.0.0 (from gitdb2>=2.0.0->GitPython==2.1.11->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/55/d2/866d45e3a121ee15a1dc013824d58072fd5c7799c9c34d01378eb262ca8f/smmap2-2.0.5-py2.py3-none-any.whl
Installing collected packages: Click, smmap2, gitdb2, GitPython, honcho, MarkupSafe, jinja2, python-dateutil, python-crontab, urllib3, certifi, chardet, requests, semantic-version, virtualenv, bench
Running setup.py install for python-crontab … done
Running setup.py develop for bench
Successfully installed Click-7.0 GitPython-2.1.11 MarkupSafe-1.1.1 bench certifi-2019.9.11 chardet-3.0.4 gitdb2-2.0.6 honcho-1.0.1 jinja2-2.10.3 python-crontab-2.4.0 python-dateutil-2.8.0 requests-2.22.0 semantic-version-2.8.2 smmap2-2.0.5 urllib3-1.25.6 virtualenv-16.7.7
erpnext@p10erp2:/opt/erpnext/bench-repo$
erpnext@p10erp2:/opt/erpnext/bench-repo$ sudo -H pip install -e bench-repo
Obtaining file:///opt/erpnext/bench-repo/bench-repo
Requirement already satisfied: Click in /usr/local/lib/python2.7/dist-packages (from bench==4.1.0)
Requirement already satisfied: GitPython==2.1.11 in /usr/local/lib/python2.7/dist-packages (from bench==4.1.0)
Requirement already satisfied: honcho in /usr/local/lib/python2.7/dist-packages (from bench==4.1.0)
Requirement already satisfied: jinja2 in /usr/local/lib/python2.7/dist-packages (from bench==4.1.0)
Requirement already satisfied: python-crontab in /usr/local/lib/python2.7/dist-packages (from bench==4.1.0)
Requirement already satisfied: requests in /usr/local/lib/python2.7/dist-packages (from bench==4.1.0)
Requirement already satisfied: semantic_version in /usr/local/lib/python2.7/dist-packages (from bench==4.1.0)
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from bench==4.1.0)
Requirement already satisfied: virtualenv in /usr/local/lib/python2.7/dist-packages (from bench==4.1.0)
Requirement already satisfied: gitdb2>=2.0.0 in /usr/local/lib/python2.7/dist-packages (from GitPython==2.1.11->bench==4.1.0)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2.7/dist-packages (from jinja2->bench==4.1.0)
Requirement already satisfied: python-dateutil in /usr/local/lib/python2.7/dist-packages (from python-crontab->bench==4.1.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python2.7/dist-packages (from requests->bench==4.1.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests->bench==4.1.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/dist-packages (from requests->bench==4.1.0)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python2.7/dist-packages (from requests->bench==4.1.0)
Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python2.7/dist-packages (from gitdb2>=2.0.0->GitPython==2.1.11->bench==4.1.0)
Installing collected packages: bench
Found existing installation: bench 4.1.0
Can’t uninstall ‘bench’. No files were found to uninstall.
Running setup.py develop for bench
Successfully installed bench

erpnext@p10erp2:/opt/erpnext/bench-repo$
erpnext@p10erp2:/opt/erpnext/bench-repo$ whoami
erpnext

1 Like

apt-get install python-minimal

apt-get install build-essential python-setuptools

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

sudo python install.py --production --user frappe

sudo passwd frappe

usermod -aG sudo frappe

su frappe

cd ~/frappe-bench

bench set-config developer_mode 1

1 Like

Maybe you also need to set it on this subdir…??

sudo chown -R erpnext:erpnext /opt/erpnext

that was performed earlier trentmu…

Now the real misery begins!

erpnext@p10erp2:/opt/erpnext/bench-repo$ 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/erpnext/bench-repo/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/erpnext/bench-repo/bench-repo/bench/commands/make.py”, line 31, in init
python = python)
File “/opt/erpnext/bench-repo/bench-repo/bench/utils.py”, line 52, in init
raise ValueError(‘Bench Instance {path} already exists.’.format(path = path))
ValueError: Bench Instance erpnext already exists.

Thanks, I’m going to give it a go. It seems I am having very similar issues. Nothing I’ve found so far covers it all end to end.

You’re right, no matter what they say in the comments the install for this is beyond woeful. I’ll document it properly if I manage to get it working.

thanks Loftwah - everyones approach goes reasonably well until the pip install / bench init part. At this point there are endless errors

It would be useful if anyone has a script that can run an environment check to assist with trouble shooting - im assuming someone here can install this product so there must be an understood starting position… its beyond me currently, and life i too short!

1 Like

It is a great framework and I’m really looking forward to using it. I think I may have a solution, I had it running but not quite as it should have been. The best image I’ve used is the Bitnami one but it has been a bit too overwhelming to get started on development. I did find a nice little gotcha that I’m trying right now, apparently if you run a bench update before bench start on initial setup it is supposed to make a difference.

The best guides I’ve found so far are.

The Ansible playbooks always fail for me but I can get it running with a little jiggery pokery afterwards. The best I’ve had it gets it installed and running but then it fails to initiate from the web browser.

TASK [bench : python3 bench init for develop] *****************************************************************************************************************
task path: /tmp/.bench/playbooks/roles/bench/tasks/main.yml:31
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c ‘echo ~root && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /var/tmp/ansible-tmp-1572429446.348314-188734856924131” && echo ansible-tmp-1572429446.348314-188734856924131=“echo /var/tmp/ansible-tmp-1572429446.348314-188734856924131” ) && sleep 0’
Using module file /usr/local/lib/python3.5/dist-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /home/frappe/.ansible/tmp/ansible-local-1223141f953zt/tmpktelknyl TO /var/tmp/ansible-tmp-1572429446.348314-188734856924131/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c ‘setfacl -m u:frappe:r-x /var/tmp/ansible-tmp-1572429446.348314-188734856924131/ /var/tmp/ansible-tmp-1572429446.348314-188734856924131/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘sudo -H -S -n -u frappe /bin/sh -c ‘"’“‘echo BECOME-SUCCESS-gedihywyngavixfzsrlpaplufkfujzol ; /usr/bin/python3 /var/tmp/ansible-tmp-1572429446.348314-188734856924131/AnsiballZ_command.py’”’“’ && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘rm -f -r /var/tmp/ansible-tmp-1572429446.348314-188734856924131/ > /dev/null 2>&1 && sleep 0’
fatal: [localhost]: FAILED! => {
“changed”: true,
“cmd”: [
“bench”,
“init”,
“/home/frappe/frappe-bench”,
“–frappe-path”,
GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript”,
“–frappe-branch”,
“version-12”,
“–python”,
“python3”
],
“delta”: “0:01:16.672102”,
“end”: “2019-10-30 09:58:43.271130”,
“invocation”: {
“module_args”: {
“_raw_params”: “bench init /home/frappe/frappe-bench --frappe-path GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --frappe-branch version-12 --python python3”,
“_uses_shell”: false,
“argv”: null,
“chdir”: null,
“creates”: “/home/frappe/frappe-bench”,
“executable”: null,
“removes”: null,
“stdin”: null,
“stdin_add_newline”: true,
“strip_empty_ends”: true,
“warn”: true
}
},
“msg”: “non-zero return code”,
“rc”: 1,
“start”: “2019-10-30 09:57:26.599028”,
“stderr”: “INFO:bench.utils:virtualenv -q env -p /usr/bin/python3\nINFO:bench.utils:env/bin/pip -q install --upgrade pip\nINFO:bench.utils:env/bin/pip -q install wheel\nINFO:bench.utils:env/bin/pip -q install six\nINFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit\nINFO:bench.app:getting app frappe\nINFO:bench.utils:git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --branch version-12 --depth 1 --origin upstream\nCloning into ‘frappe’…\nwarning: unable to access ‘/home/frappe/.config/git/attributes’: Permission denied\nINFO:bench.app:installing frappe\nINFO:bench.utils:/home/frappe/frappe-bench/env/bin/pip install -q -e /home/frappe/frappe-bench/apps/frappe \nINFO:bench.utils:yarn install\nerror An unexpected error occurred: "EACCES: permission denied, scandir ‘/home/frappe/.config/yarn/link’".\nTraceback (most recent call last):\n File "/usr/local/bin/bench", line 11, in \n load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()\n File "/home/frappe/.bench/bench/cli.py", line 40, in cli\n bench_command()\n File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 764, in call\n return self.main(*args, **kwargs)\n File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 717, in main\n rv = self.invoke(ctx)\n File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1137, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 956, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 555, in invoke\n return callback(*args, **kwargs)\n File "/home/frappe/.bench/bench/commands/make.py", line 31, in init\n python \t\t = python)\n File "/home/frappe/.bench/bench/utils.py", line 84, in init\n update_node_packages(bench_path=path)\n File "/home/frappe/.bench/bench/utils.py", line 457, in update_node_packages\n update_yarn_packages(bench_path)\n File "/home/frappe/.bench/bench/utils.py", line 470, in update_yarn_packages\n exec_cmd(‘yarn install’, cwd=app_path)\n File "/home/frappe/.bench/bench/utils.py", line 161, in exec_cmd\n raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: yarn install”,
“stderr_lines”: [
“INFO:bench.utils:virtualenv -q env -p /usr/bin/python3”,
“INFO:bench.utils:env/bin/pip -q install --upgrade pip”,
“INFO:bench.utils:env/bin/pip -q install wheel”,
“INFO:bench.utils:env/bin/pip -q install six”,
“INFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit”,
“INFO:bench.app:getting app frappe”,
“INFO:bench.utils:git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --branch version-12 --depth 1 --origin upstream”,
“Cloning into ‘frappe’…”,
“warning: unable to access ‘/home/frappe/.config/git/attributes’: Permission denied”,
“INFO:bench.app:installing frappe”,
“INFO:bench.utils:/home/frappe/frappe-bench/env/bin/pip install -q -e /home/frappe/frappe-bench/apps/frappe “,
“INFO:bench.utils:yarn install”,
“error An unexpected error occurred: "EACCES: permission denied, scandir ‘/home/frappe/.config/yarn/link’".”,
“Traceback (most recent call last):”,
" File "/usr/local/bin/bench", line 11, in ”,
" load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()”,
" File "/home/frappe/.bench/bench/cli.py", line 40, in cli”,
" bench_command()“,
" File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 764, in call”,
" return self.main(*args, **kwargs)“,
" File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 717, in main”,
" rv = self.invoke(ctx)“,
" File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1137, in invoke”,
" return _process_result(sub_ctx.command.invoke(sub_ctx))“,
" File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 956, in invoke”,
" return ctx.invoke(self.callback, **ctx.params)“,
" File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 555, in invoke”,
" return callback(*args, **kwargs)“,
" File "/home/frappe/.bench/bench/commands/make.py", line 31, in init”,
" python \t\t = python)“,
" File "/home/frappe/.bench/bench/utils.py", line 84, in init”,
" update_node_packages(bench_path=path)“,
" File "/home/frappe/.bench/bench/utils.py", line 457, in update_node_packages”,
" update_yarn_packages(bench_path)“,
" File "/home/frappe/.bench/bench/utils.py", line 470, in update_yarn_packages”,
" exec_cmd(‘yarn install’, cwd=app_path)“,
" File "/home/frappe/.bench/bench/utils.py", line 161, in exec_cmd”,
" raise CommandFailedError(cmd)",
“bench.utils.CommandFailedError: yarn install”
],
“stdout”: “Already using interpreter /usr/bin/python3\nyarn install v1.19.1\ninfo If you think this is a bug, please open a bug report with the information provided in "/home/frappe/frappe-bench/apps/frappe/yarn-error.log".\ninfo Visit yarn install | Yarn for documentation about this command.\ninstalling frappe\nUpdating node packages…”,
“stdout_lines”: [
“Already using interpreter /usr/bin/python3”,
“yarn install v1.19.1”,
“info If you think this is a bug, please open a bug report with the information provided in "/home/frappe/frappe-bench/apps/frappe/yarn-error.log".”,
“info Visit yarn install | Yarn for documentation about this command.”,
“installing frappe”,
“Updating node packages…”
]
}

PLAY RECAP ****************************************************************************************************************************************************
localhost : ok=45 changed=30 unreachable=0 failed=1 skipped=67 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2
frappe@ubuntu-s-1vcpu-2gb-sgp1-01:~$

New errors almost every time I install it :frowning:

frappe@ubuntu-s-1vcpu-2gb-sgp1-01:~/frappe-bench$ bench update

This update will remove Celery config and prepare the bench to use Python RQ.
And it will overwrite Procfile and supervisor.conf.
If you don’t know what this means, type Y :wink:

Do you want to continue? [y/N]: y

This update will replace ERPNext’s Redis configuration files to fix a major security issue.
If you don’t know what this means, type Y :wink:

Do you want to continue? [y/N]: y
npm WARN saveError ENOENT: no such file or directory, open ‘/home/frappe/frappe-bench/package.json’
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open ‘/home/frappe/frappe-bench/package.json’
npm WARN frappe-bench No description
npm WARN frappe-bench No repository field.
npm WARN frappe-bench No README data
npm WARN frappe-bench No license field.

┌──────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /home/frappe/.config │
└──────────────────────────────────────────────────────────┘
INFO:bench.utils:npm install yarn
npm notice created a lockfile as package-lock.json. You should commit this file.

  • yarn@1.19.1
    added 1 package and audited 1 package in 0.827s
    found 0 vulnerabilities

┌──────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /home/frappe/.config │
└──────────────────────────────────────────────────────────┘
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python3.5/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.5/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.5/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.5/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.5/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 51, in update
validate_branch()
File “/home/frappe/.bench/bench/app.py”, line 428, in validate_branch
branch = get_current_branch(app)
File “/home/frappe/.bench/bench/app.py”, line 281, in get_current_branch
return get_cmd_output(“basename $(git symbolic-ref -q HEAD)”, cwd=repo_dir)
File “/home/frappe/.bench/bench/utils.py”, line 370, in get_cmd_output
output = subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess.PIPE).strip()
File “/usr/lib/python3.5/subprocess.py”, line 626, in check_output
**kwargs).stdout
File “/usr/lib/python3.5/subprocess.py”, line 693, in run
with Popen(*popenargs, **kwargs) as process:
File “/usr/lib/python3.5/subprocess.py”, line 947, in init
restore_signals, start_new_session)
File “/usr/lib/python3.5/subprocess.py”, line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: ‘./apps/erpnext’
frappe@ubuntu-s-1vcpu-2gb-sgp1-01:~/frappe-bench$ sudo bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python3.5/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.5/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.5/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.5/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.5/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 51, in update
validate_branch()
File “/home/frappe/.bench/bench/app.py”, line 428, in validate_branch
branch = get_current_branch(app)
File “/home/frappe/.bench/bench/app.py”, line 281, in get_current_branch
return get_cmd_output(“basename $(git symbolic-ref -q HEAD)”, cwd=repo_dir)
File “/home/frappe/.bench/bench/utils.py”, line 370, in get_cmd_output
output = subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess.PIPE).strip()
File “/usr/lib/python3.5/subprocess.py”, line 626, in check_output
**kwargs).stdout
File “/usr/lib/python3.5/subprocess.py”, line 693, in run
with Popen(*popenargs, **kwargs) as process:
File “/usr/lib/python3.5/subprocess.py”, line 947, in init
restore_signals, start_new_session)
File “/usr/lib/python3.5/subprocess.py”, line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: ‘./apps/erpnext’
frappe@ubuntu-s-1vcpu-2gb-sgp1-01:~/frappe-bench$

I’d advise against the Easy Install install.py, and go for a manual installation. The best publicly available guide I’ve seen is this:

The Hitchhiker’s Guide to Installing Frappe on Linux

Before installing, take time to make sure your MariaDB database is online, and can be accessed using the the root password.

If you get stuck, there’s now an ERPNext Public Help channel on Telegram: Telegram: Contact @erpnexthelp. Plenty of us lurk there. :slightly_smiling_face:

1 Like

Hi,
I had some weeks ago the same problem until I found a solution after trial and error many times. Please look at ERPNext DNS-Multitenant - disable recursion on the DNS Server - #4 by Curt.Beck.

Today I started a new installation in combination with wordpress. The result was, that the easy install script doesn’t work anymore. I don’t get it. How can this happen? I’m not a Linux Pro, I just want to use ERPNext! The thing with easy open source is not valid for ERPNext, you need a professinal. I really don’t get it. What is the problem for a professional coder to code a installation routine which just works?!

I think the challange should be to use and adapt ERPNext, not to install it.

Maybe there is an IT and ERPNext-Master who can do this for all people all over the world? We need your help!

Thank you in advance!

PS: Can anybody currently install ERPNext? Which update of what causes the error during the installation?

1 Like

A fool proof install is no easy feat to specify if not code for - with users and computers, either end can quickly and easily outwit the other(!) - this forum is proof of that.

Plus to expect ERPNext to be all things to all people, and to simply work in all manner of host environments - is probably too ambitious, impractical and unsustainable a maintenance goal that no (paid or unpaid) person or organization would ever hope to realistically support.

1 Like

@Curt.Beck - I’ve got plenty to say on this topic. It deserves its own thread for another day.

But in the meantime. If you can please share your error, then I will try to help.

I’ve installed ERPNext many times, always manually. The Easy Install script and I are not friends. Nonetheless, I’m familiar with many of the usual errors. If you can share yours, I may be able to identify the cause, and offer some advice.

1 Like

Ok, I tried more ways, without reach the goal. I have a vserver with ubuntu 18lts. I reset the server before every new try.

My current installation routine is a combination of many proposed solutions:
sudo apt update && apt upgrade -y && apt autoremove -y
sudo apt-get install git
sudo apt-get install python-dev
sudo apt-get install python3-dev
sudo apt-get install python-setuptools python-pip
sudo apt-get install python3-setuptools python3-pip
alias python=python3
alias pip=pip3
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository ‘deb [arch=amd64,i386,ppc64el] Index of /mirror/mariadb/repo/10.3/ubuntu/ xenial main’
sudo apt-get update
sudo apt-get install mariadb-server-10.3
sudo apt-get install libmysqlclient-dev
sudo nano /etc/mysql/my.cnf
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

sudo service mysql restart
sudo apt-get install redis-server
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g yarn
sudo useradd -m -s /bin/bash erpnext
sudo passwd erpnext
sudo usermod -aG sudo erpnext
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
sudo ufw allow ‘Nginx Full’
su - erpnext
nano .bashrc
PATH=$PATH:~/.local/bin/
logout
reboot
su - erpnext
git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps
pip install -e ./bench
bench --version
bench init --frappe-branch version-12 --python /usr/bin/python3 frappe-bench
cd frappe-bench
./env/bin/pip3 install -e apps/frappe/
sudo mysql -u root -p
create database erpnextdb;
create user erpnext@localhost identified by ‘Password’;
GRANT ALL ON erpnextdb.* TO ‘erpnext’@‘localhost’ IDENTIFIED BY ‘Password’ WITH GRANT OPTION;
GRANT all privileges on . to ‘root’@‘localhost’ IDENTIFIED BY ‘Password1’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
bench start
bench get-app --branch version-12 erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)

At the moment with the last line the following error occurs:
~/frappe-bench$ bench get-app --branch version-12 erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
INFO:bench.app:getting app erpnext
INFO:bench.utils:git clone GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch version-12 --depth 1 --origin upstream
fatal: destination path ‘erpnext’ already exists and is not an empty directory.
Traceback (most recent call last):
File “/home/erpnext/.local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/erpnext/bench/bench/cli.py”, line 40, in cli
bench_command()
File “/home/erpnext/.local/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/erpnext/.local/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/erpnext/.local/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/.local/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/erpnext/.local/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench/bench/commands/make.py”, line 41, in get_app
get_app(git_url, branch=branch)
File “/home/erpnext/bench/bench/app.py”, line 125, in get_app
cwd=os.path.join(bench_path, ‘apps’))
File “/home/erpnext/bench/bench/utils.py”, line 161, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git clone GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch version-12 --depth 1 --origin upstream

What is my mistake?

Thank you!

Nope, its not working too. I got this:

Traceback (most recent call last):
  File "install.py", line 413, in <module>
    install_bench(args)
  File "install.py", line 135, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 327, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=nescafe']' returned non-zero exit status 2

Hi @Mohammad_Ahmad_Zulfi,

It used to work on Ubuntu 16, ive done it many atimes. But recently something changed and it stopped working.

Even the ubuntu 18 installation steps found on the forum worked about a month ago, I have a running VM which I done so, but when I tried a fresh one trying to show my dev team how to get erpnext up and running it fails. so definetly something changed.

Currently installing on a fresh ubuntu 16 no updates (desktop version) it fails at this step:

TASK [common : install pillow prerequisites for Ubuntu < 14.04] **************************************************
task path: /tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml:3
[DEPRECATION WARNING]: Invoking “apt” only once while using a loop via squash_actions is deprecated. Instead of
using a loop to supply multiple items and specifying pkg: "{{ item }}", please use pkg: ['libjpeg8-dev', 'libtiff4-dev', 'tcl8.5-dev', 'tk8.5-dev'] and remove the loop. This feature will be removed in version 2.11.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
fatal: [localhost]: FAILED! => {
“msg”: “The conditional check ‘ansible_distribution_version | version_compare(‘14.04’, ‘lt’)’ failed. The error was: template error while templating string: no filter named ‘version_compare’. String: {% if ansible_distribution_version | version_compare(‘14.04’, ‘lt’) %} True {% else %} False {% endif %}\n\nThe error appears to be in ‘/tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml’: line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: install pillow prerequisites for Ubuntu < 14.04\n ^ here\n”
}

PLAY RECAP *******************************************************************************************************
localhost : ok=4 changed=1 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python3.5/subprocess.py”, line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2

Why are you using Ubuntu 16?