Bench re-install error in in ubuntu 16.04

I have successfully installed frappe bench in ubuntu 16.04, but due to some experimental changes in mariadb database, bench stopped working. So I deleted frappe user & all data, uninstalled mariadb & tried to install fresh.

Now when I try to install frappe again I am getting following error & unable to install.


thinpc@ubuntu1604:~/Downloads$ sudo python install.py --develop --user frappe
Get:1 Index of /ubuntu xenial-security InRelease [94.5 kB]
Hit:2 Index of /ubuntu xenial InRelease
Hit:3 http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu xenial InRelease
Hit:4 Index of /webupd8team/atom/ubuntu xenial InRelease
Hit:5 Index of /ubuntu xenial-updates InRelease
Hit:6 Index of /ubuntu xenial-backports InRelease
Hit:7 https://deb.nodesource.com/node_5.x xenial InRelease
Fetched 94.5 kB in 1s (48.0 kB/s)
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
build-essential is already the newest version (12.1ubuntu2).
git is already the newest version (1:2.7.4-0ubuntu1).
libffi-dev is already the newest version (3.2.1-4).
python-dev is already the newest version (2.7.11-1).
python-setuptools is already the newest version (20.7.0-1).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.2).
0 upgraded, 0 newly installed, 0 to remove and 99 not upgraded.
The directory ‘/home/thinpc/.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/thinpc/.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.
Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages
The directory ‘/home/thinpc/.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/thinpc/.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.
Requirement already satisfied (use --upgrade to upgrade): ansible==2.0.2.0 in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): paramiko in /usr/local/lib/python2.7/dist-packages (from ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): jinja2 in /usr/local/lib/python2.7/dist-packages (from ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): PyYAML in /usr/local/lib/python2.7/dist-packages (from ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): pycrypto>=2.6 in /usr/local/lib/python2.7/dist-packages (from ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): cryptography>=1.1 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): MarkupSafe in /usr/local/lib/python2.7/dist-packages (from jinja2->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.4.1->cryptography>=1.1->paramiko->ansible==2.0.2.0)
[WARNING]: Host file not found: /etc/ansible/hosts

[WARNING]: provided hosts list is empty, only localhost is available

PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [Create user] *************************************************************
ok: [localhost]

TASK [Set home folder perms] ***************************************************
ok: [localhost]

TASK [Set home folder perms] ***************************************************
skipping: [localhost]

TASK [Set /tmp/.bench folder perms] ********************************************
fatal: [localhost]: FAILED! => {“failed”: true, “msg”: “‘repo_path’ is undefined”}

NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @develop/create_user.retry

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

Traceback (most recent call last):
File “install.py”, line 264, in
install_bench(args)
File “install.py”, line 86, in install_bench
run_playbook(‘develop/create_user.yml’, extra_vars=extra_vars)
File “install.py”, line 217, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(tmp_bench_repo, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘develop/create_user.yml’, ‘-e’, ‘@/tmp/extra_vars.json’]’ returned non-zero exit status 2

@Ravi_Modi

It seems you did not delete folder /tmp/.bench, so while you are running the script second time, it gives you the error. Please try deleting the .bench folder in the above path and then running it. Also note that, develop branch has some issue python LDAP dependencies.

Please install following running the script to avoid the failure,

sudo apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev
1 Like

Dear Shreyasp,

I tried deleting /tmp/.bench folder & also installed libsasl2-dev python-dev libldap2-dev libssl-dev, before running install script, but getting same error again. Unable to install bench.

Any Solution to above issue ? . I have made many changes & Customization in Ubuntu OS & don’t want to start all over.