Errors installing bench with easy install script

On Ubuntu server running in a google cloud VM, I’m installing bench with the easy install script.

I’m getting an error, that I can’t solve.
The commands I ran:

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

The second command fails on task unarchive wkhtmltopdf with:

TASK [unarchive wkhtmltopdf] ***************************************************
fatal: [localhost]: FAILED! => {"changed": false, "check_results": {"cmd": "/bin/tar -C \"/tmp\" --diff -f \"/tmp/ansible-tmp-1490712022.68-203047486519908/source\"", "err": "", "out": "wkhtmltox/lib/libwkhtmltox.so.0.12.3: Uid differs\nwkhtmltox/lib/libwkhtmltox.so.0.12.3: Gid differs\nwkhtmltox/share/man/man1/wkhtmltoimage.1.gz: Uid differs\nwkhtmltox/share/man/man1/wkhtmltoimage.1.gz: Gid differs\nwkhtmltox/share/man/man1/wkhtmltopdf.1.gz: Uid differs\nwkhtmltox/share/man/man1/wkhtmltopdf.1.gz: Gid differs\nwkhtmltox/include/wkhtmltox/pdf.h: Uid differs\nwkhtmltox/include/wkhtmltox/pdf.h: Gid differs\nwkhtmltox/include/wkhtmltox/dllend.inc: Uid differs\nwkhtmltox/include/wkhtmltox/dllend.inc: Gid differs\nwkhtmltox/include/wkhtmltox/dllbegin.inc: Uid differs\nwkhtmltox/include/wkhtmltox/dllbegin.inc: Gid differs\nwkhtmltox/include/wkhtmltox/image.h: Uid differs\nwkhtmltox/include/wkhtmltox/image.h: Gid differs\nwkhtmltox/bin/wkhtmltoimage: Uid differs\nwkhtmltox/bin/wkhtmltoimage: Gid differs\nwkhtmltox/bin/wkhtmltopdf: Uid differs\nwkhtmltox/bin/wkhtmltopdf: Gid differs\n", "rc": 1, "unarchived": false}, "dest": "/tmp", "extract_results": {"cmd": "/bin/tar -xf \"/tmp/ansible-tmp-1490712022.68-203047486519908/source\"", "err": "/bin/tar: wkhtmltox/lib/libwkhtmltox.so.0.12.3: Cannot open: File exists\n/bin/tar: wkhtmltox/lib/libwkhtmltox.so.0: Cannot create symlink to ?libwkhtmltox.so.0.12.3?: File exists\n/bin/tar: wkhtmltox/lib/libwkhtmltox.so.0.12: Cannot create symlink to ?libwkhtmltox.so.0.12.3?: File exists\n/bin/tar: wkhtmltox/lib/libwkhtmltox.so: Cannot create symlink to ?libwkhtmltox.so.0.12.3?: File exists\n/bin/tar: wkhtmltox/lib: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/share/man/man1/wkhtmltoimage.1.gz: Cannot open: File exists\n/bin/tar: wkhtmltox/share/man/man1/wkhtmltopdf.1.gz: Cannot open: File exists\n/bin/tar: wkhtmltox/share/man/man1: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/share/man: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/share: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/include/wkhtmltox/pdf.h: Cannot open: File exists\n/bin/tar: wkhtmltox/include/wkhtmltox/dllend.inc: Cannot open: File exists\n/bin/tar: wkhtmltox/include/wkhtmltox/dllbegin.inc: Cannot open: File exists\n/bin/tar: wkhtmltox/include/wkhtmltox/image.h: Cannot open: File exists\n/bin/tar: wkhtmltox/include/wkhtmltox: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/include: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/bin/wkhtmltoimage: Cannot open: File exists\n/bin/tar: wkhtmltox/bin/wkhtmltopdf: Cannot open: File exists\n/bin/tar: wkhtmltox/bin: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox: Cannot utime: Operation not permitted\n/bin/tar: Exiting with failure status due to previous errors\n", "out": "", "rc": 2}, "failed": true, "gid": 0, "group": "root", "handler": "TarArchive", "mode": "01777", "msg": "failed to unpack /tmp/ansible-tmp-1490712022.68-203047486519908/source to /tmp", "owner": "root", "size": 4096, "src": "/tmp/ansible-tmp-1490712022.68-203047486519908/source", "state": "directory", "uid": 0}
	to retry, use: --limit @develop/install.retry

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

Traceback (most recent call last):
  File "install.py", line 351, in <module>
    install_bench(args)
  File "install.py", line 108, in install_bench
    run_playbook('develop/install.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 301, 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', 'develop/install.yml', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=elliotschep']' returned non-zero exit status 2

Near the top of the error I see the line to retry, use: --limit @develop/install.retry.

Following that I did

sudo python install.py --develop --limit @develop/install.retry

which got the error

usage: install.py [-h] [--develop | --production] [--site SITE] [--verbose]
                  [--user USER] [--bench-branch BENCH_BRANCH]
                  [--repo-url REPO_URL]
install.py: error: unrecognized arguments: --limit @develop/install.retry

Previous to this I was experiencing errors on my MacOS installation as well, but using a different installation method. "There were errors" - Trying to setup new site

I previously found this topic. I followed @sagar’s suggestion of manually installing wkhtmltopdf with this guide. Still receiving errors:

fatal: [localhost]: FAILED! => {"changed": false, "check_results": {"cmd": "/bin/tar -C \"/tmp\" --diff -f \"/tmp/ansible-tmp-1490713126.4-238462678955066/source\"", "err": "", "out": "wkhtmltox/lib/libwkhtmltox.so.0.12.3: Uid differs\nwkhtmltox/lib/libwkhtmltox.so.0.12.3: Gid differs\nwkhtmltox/share/man/man1/wkhtmltoimage.1.gz: Uid differs\nwkhtmltox/share/man/man1/wkhtmltoimage.1.gz: Gid differs\nwkhtmltox/share/man/man1/wkhtmltopdf.1.gz: Uid differs\nwkhtmltox/share/man/man1/wkhtmltopdf.1.gz: Gid differs\nwkhtmltox/include/wkhtmltox/pdf.h: Uid differs\nwkhtmltox/include/wkhtmltox/pdf.h: Gid differs\nwkhtmltox/include/wkhtmltox/dllend.inc: Uid differs\nwkhtmltox/include/wkhtmltox/dllend.inc: Gid differs\nwkhtmltox/include/wkhtmltox/dllbegin.inc: Uid differs\nwkhtmltox/include/wkhtmltox/dllbegin.inc: Gid differs\nwkhtmltox/include/wkhtmltox/image.h: Uid differs\nwkhtmltox/include/wkhtmltox/image.h: Gid differs\nwkhtmltox/bin/wkhtmltoimage: Uid differs\nwkhtmltox/bin/wkhtmltoimage: Gid differs\nwkhtmltox/bin/wkhtmltopdf: Uid differs\nwkhtmltox/bin/wkhtmltopdf: Gid differs\n", "rc": 1, "unarchived": false}, "dest": "/tmp", "extract_results": {"cmd": "/bin/tar -xf \"/tmp/ansible-tmp-1490713126.4-238462678955066/source\"", "err": "/bin/tar: wkhtmltox/lib/libwkhtmltox.so.0.12.3: Cannot open: File exists\n/bin/tar: wkhtmltox/lib/libwkhtmltox.so.0: Cannot create symlink to ?libwkhtmltox.so.0.12.3?: File exists\n/bin/tar: wkhtmltox/lib/libwkhtmltox.so.0.12: Cannot create symlink to ?libwkhtmltox.so.0.12.3?: File exists\n/bin/tar: wkhtmltox/lib/libwkhtmltox.so: Cannot create symlink to ?libwkhtmltox.so.0.12.3?: File exists\n/bin/tar: wkhtmltox/lib: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/share/man/man1/wkhtmltoimage.1.gz: Cannot open: File exists\n/bin/tar: wkhtmltox/share/man/man1/wkhtmltopdf.1.gz: Cannot open: File exists\n/bin/tar: wkhtmltox/share/man/man1: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/share/man: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/share: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/include/wkhtmltox/pdf.h: Cannot open: File exists\n/bin/tar: wkhtmltox/include/wkhtmltox/dllend.inc: Cannot open: File exists\n/bin/tar: wkhtmltox/include/wkhtmltox/dllbegin.inc: Cannot open: File exists\n/bin/tar: wkhtmltox/include/wkhtmltox/image.h: Cannot open: File exists\n/bin/tar: wkhtmltox/include/wkhtmltox: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/include: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox/bin/wkhtmltoimage: Cannot open: File exists\n/bin/tar: wkhtmltox/bin/wkhtmltopdf: Cannot open: File exists\n/bin/tar: wkhtmltox/bin: Cannot utime: Operation not permitted\n/bin/tar: wkhtmltox: Cannot utime: Operation not permitted\n/bin/tar: Exiting with failure status due to previous errors\n", "out": "", "rc": 2}, "failed": true, "gid": 0, "group": "root", "handler": "TarArchive", "mode": "01777", "msg": "failed to unpack /tmp/ansible-tmp-1490713126.4-238462678955066/source to /tmp", "owner": "root", "size": 4096, "src": "/tmp/ansible-tmp-1490713126.4-238462678955066/source", "state": "directory", "uid": 0}

It looks like @Marcin_Walkow was getting the same error, but @felipeDigi’s suggestion (same as @sagar’s suggestion) seemed to fix it for him. See here

hi ,@ratskin
are you installing the erpnext setup at first time?
if Yes try to install Production Setup for installing the Prerequisite.

Thanks

1 Like

Hi @sagar,

Do you mean “Is this the first time you are installing ERPNext, ever (as in you are total n00b at this)?”?

If so then, my answer is: “No. This is about the 50th time I’m trying to install ERPNext.”

If instead you mean “Is this the first time you are installing ERPNext on this server/computer?”, then my answer is “Yes, this was an entirely new server before I tried to install ERPNext.”

Following that, since my answer is “Yes” (or no, depending on what you meant), I have tried to install the production setup of ERPNext, following this method:

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

And amazingly it seems to have worked. I also converted this to a dev server with this:

bench switch-to-develop
rm config/supervisor.conf
rm config/nginx.conf
sudo service nginx stop
sudo service supervisor stop
bench setup procfile
bench start
2 Likes