Error Installing Using script to Digital Ocean Droplet

I keep getting this error when running the installation script.

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo python install.py --production --user frappe

I saw a post saying to run this.

sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

and it didnt change anything.

TASK [init bench] **************************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “init”, “/home /frappe/frappe-bench”, “–frappe-branch”, “master”], “delta”: “0:02:48.486176”, “end”: “2017-06-16 01:51:46.921448”, “failed”: true, “rc”: 1, “start”: “2017-06- 16 01:48:58.435272”, “stderr”: “INFO:bench.utils:virtualenv -q env -p /usr/bin/p ython\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 -e gi t+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 --b ranch master --origin upstream\nCloning into ‘frappe’…\nINFO:bench.app:instal ling frappe\nINFO:bench.utils:/home/frappe/frappe-bench/env/bin/pip install -q -e /home/frappe/frappe-bench/apps/frappe --no-cache-dir\n/home/frappe/frappe-ben ch/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/u til/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. Th is may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this . For more information, see https://urllib3.readthedocs.io/en/latest/security.ht ml#snimissingwarning.\n SNIMissingWarning\n/home/frappe/frappe-bench/env/local/ lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:1 22: InsecurePlatformWarning: A true SSLContext object is not available. This pre vents urllib3 from configuring SSL appropriately and may cause certain SSL conne ctions to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#ins ecureplatformwarning.\n InsecurePlatformWarning\nINFO:bench.utils:npm install\n npm WARN deprecated isarray@2.0.1: Just use Array.isArray directly\n\n\nTracebac k (most recent call last):\n File "/usr/local/bin/bench", line 11, in \n load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()\n File "/home/f rappe/.bench/bench/cli.py", line 40, in cli\n bench_command()\n File "/usr /local/lib/python2.7/dist-packages/click/core.py", line 722, in call\n r eturn self.main(*args, **kwargs)\n File "/usr/local/lib/python2.7/dist-package s/click/core.py", line 697, in main\n rv = self.invoke(ctx)\n File "/usr/l ocal/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke\n retu rn _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/usr/local/lib/pyt hon2.7/dist-packages/click/core.py", line 895, in invoke\n return ctx.invoke (self.callback, **ctx.params)\n File "/usr/local/lib/python2.7/dist-packages/c lick/core.py", line 535, in invoke\n return callback(*args, **kwargs)\n Fil e "/home/frappe/.bench/bench/commands/make.py", line 19, in init\n verbose= verbose, clone_from=clone_from)\n File "/home/frappe/.bench/bench/utils.py", line 64, in init\n update_npm_packages(bench_path=path)\n File "/home/frapp e/.bench/bench/utils.py", line 431, in update_npm_packages\n exec_cmd(‘npm i nstall’, cwd=bench_path)\n File "/home/frappe/.bench/bench/utils.py", line 13 0, in exec_cmd\n raise CommandFailedError(cmd)\nbench.utils.CommandFailedErro r: npm install”, “stdout”: “Already using interpreter /usr/bin/python\n\n> uws@0 .14.5 install /home/frappe/frappe-bench/node_modules/uws\n> node-gyp rebuild > b uild_log.txt 2>&1 || exit 0\n\n(‘installing’, u’frappe’)\nUpdating node librarie s…”, “stdout_lines”: [“Already using interpreter /usr/bin/python”, “”, “> uws@ 0.14.5 install /home/frappe/frappe-bench/node_modules/uws”, “> node-gyp rebuild > build_log.txt 2>&1 || exit 0”, “”, “(‘installing’, u’frappe’)”, “Updating node libraries…”], “warnings”: []}
to retry, use: --limit @production/install.retry

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

Traceback (most recent call last):
File “install.py”, line 381, in
install_bench(args)
File “install.py”, line 111, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 323, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘pro duction/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user= frappe’]’ returned non-zero exit status 2

How much RAM do you have? Min is 1GB. You might also have to setup SWAP

Yeah I found the problem. I did it with 512 and a 2G swap. No problems after that. :slight_smile: