Issue with installation of ERPNext v11(staging) in ubuntu 18

I am trying to install v11 on fresh ubuntu 18 but I am getting error returned non-zero exit status 2. Also I am not getting the frappe bench folder.

This is my method

1) cd ~ && apt-get update && apt-get upgrade -y && apt-get install -y curl zsh git vim python-dev

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

 3) sudo python install.py --production --user frappe --mysql-root-password erp12 --admin-password erp12

I am not able to get bench folder. Even on trying
bench init frappe-bench && cd frappe-bench
Its giving me some error to install ruby or something

Post the full error. Will be easier to get help.

Also I am not able to find frappe bench folder in frappe user

Looks like a problem with your node installation. I suggest you install node separately. Try nvm

That worked but on further process on running bench start. I am getting this because of which i am unable to access localhost.

Your redis config files are damaged or missing, so the background processes can’t start

Step to resolve this ?

Try this (as your frappe user) [First make backup copies of whatever files are there]

cat < /home/frappe/frappe-bench/config/redis_queue.conf
dbfilename redis_queue.rdb
dir /home/frappe/frappe-bench/config/pids
pidfile /home/frappe/frappe-bench/config/pids/redis_queue.pid
bind 127.0.0.1
port 11000
EOF

cat < /home/frappe/frappe-bench/config/redis_socketio.conf
dbfilename redis_socketio.rdb
dir /home/frappe/frappe-bench/config/pids
pidfile /home/frappe/frappe-bench/config/pids/redis_socketio.pid
bind 127.0.0.1
port 12000
EOF

cat < /home/frappe/frappe-bench/config/redis_cache.conf
dbfilename redis_cache.rdb
dir /home/frappe/frappe-bench/config/pids
pidfile /home/frappe/frappe-bench/config/pids/redis_cache.pid
bind 127.0.0.1
port 13000
maxmemory 785mb
maxmemory-policy allkeys-lru
appendonly no
save “”
EOF

Then try

bench start

didn’t worked but giving more errors now

Have you checked the running processes to see if there is something blocking one of the necessary ports?
Also check memory/diskspace

df -h | grep -v “tmp|udev”
free -mh
netstat -tnlp

i have a fresh installation and yeah i checked already there’s no error/block

Can you show more of the trace/error log so that it’s possible to see what happens higher up?

I deleted the frappe bench and tried to reinstall and now it is giving error on running this: sudo python install.py --production

Command 'sudo apt-get update' returned non-zero exit status 100

Guess I need to make a do a fresh installation of UBUNTU 18.

Still need the exact commands and methods to install v11 on ubuntu 18

Suggestions ?

Is your installation user in the sudoers list?

I would be easy to understand if you post complete traceback in text format.

Here in screenshot some contents are missing and It’s become hard for developer to understand the root cause of error, even if single line is missing from traceback.

Can you reply with complete traceback of error?

1 Like
TASK [common : Install prerequisites using apt-get] ****************************
[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: [u'dnsmasq', u'fontconfig', 
u'git', u'htop', u'libcrypto++-dev', u'libfreetype6-dev', u'liblcms2-dev', u
'libssl-dev', u'libwebp-dev', u'libxext6', u'libxrender1', u'libxslt1-dev', 
u'libxslt1.1', u'libffi-dev', u'ntp', u'postfix', u'python-dev', 
u'python3-dev', u'python-tk', u'screen', u'vim', u'xfonts-75dpi', u'xfonts-
base', u'zlib1g-dev', u'apt-transport-https', u'libsasl2-dev', u'libldap2-dev',
 u'libcups2-dev', u'pv']` 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.
failed: [localhost] (item=[u'dnsmasq', u'fontconfig', u'git', u'htop', u'libcrypto++-dev', u'libfreetype6-dev', u'liblcms2-dev', u'libssl-dev', u'libwebp-dev', u'libxext6', u'libxrender1', u'libxslt1-dev', u'libxslt1.1', u'libffi-dev', u'ntp', u'postfix', u'python-dev', u'python3-dev', u'python-tk', u'screen', u'vim', u'xfonts-75dpi', u'xfonts-base', u'zlib1g-dev', u'apt-transport-https', u'libsasl2-dev', u'libldap2-dev', u'libcups2-dev', u'pv']) => {"changed": false, "cmd": "apt-get update", "item": ["dnsmasq", "fontconfig", "git", "htop", "libcrypto++-dev", "libfreetype6-dev", "liblcms2-dev", "libssl-dev", "libwebp-dev", "libxext6", "libxrender1", "libxslt1-dev", "libxslt1.1", "libffi-dev", "ntp", "postfix", "python-dev", "python3-dev", "python-tk", "screen", "vim", "xfonts-75dpi", "xfonts-base", "zlib1g-dev", "apt-transport-https", "libsasl2-dev", "libldap2-dev", "libcups2-dev", "pv"], "msg": "E: The repository 'https://deb.nodesource.com/node_8.x bionic Release' no longer has a Release file.", "rc": 100, "stderr": "E: The repository 'https://deb.nodesource.com/node_8.x bionic Release' no longer has a Release file.\n", "stderr_lines": ["E: The repository 'https://deb.nodesource.com/node_8.x bionic Release' no longer has a Release file."], "stdout": "Ign:1 https://deb.nodesource.com/node_8.x bionic InRelease\nErr:2 https://deb.nodesource.com/node_8.x bionic Release\n  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 52.222.133.53 443]\nHit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease\nHit:4 http://in.archive.ubuntu.com/ubuntu bionic InRelease\nHit:5 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease\nGet:6 http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.3/ubuntu xenial InRelease [4612 B]\nHit:7 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease\nReading package lists...\n", "stdout_lines": ["Ign:1 https://deb.nodesource.com/node_8.x bionic InRelease", "Err:2 https://deb.nodesource.com/node_8.x bionic Release", "  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 52.222.133.53 443]", "Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease", "Hit:4 http://in.archive.ubuntu.com/ubuntu bionic InRelease", "Hit:5 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease", "Get:6 http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.3/ubuntu xenial InRelease [4612 B]", "Hit:7 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease", "Reading package lists..."]}
	to retry, use: --limit @/tmp/.bench/playbooks/site.retry

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=1   

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

i was trying again and came this error

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/erpnext/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 "/home/erpnext/bench-repo/bench/commands/make.py", line 30, in init
    python 		 = python)
  File "/home/erpnext/bench-repo/bench/utils.py", line 75, in init
    get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)
  File "/home/erpnext/bench-repo/bench/app.py", line 124, in get_app
    cwd=os.path.join(bench_path, 'apps'))
  File "/home/erpnext/bench-repo/bench/utils.py", line 159, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git clone https://github.com/frappe/frappe.git   --origin upstream

Try to install Node JS manually.

For Ref: