Got stuck in erpnext installation in ubuntu16.4 on vm

Dear All,
i got stuck in in installing erpnext production in the ubuntu 16.04 installrd in Oracle vm.
Kindly help.Below is the error
fred@fred- VirtualBox:~$ python install.py --production --user frappe
Get:1 Index of /ubuntu xenial-security InRelease [102 kB]
Hit:2 Index of /ubuntu xenial InRelease
Hit:3 http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu xenial InRelease
Get:4 Index of /ubuntu xenial-updates InRelease [102 kB]
Hit:5 https://deb.nodesource.com/node_6.x xenial InRelease
Get:6 Index of /ubuntu xenial-backports InRelease [102 kB]
Get:7 Index of /ubuntu xenial-updates/universe amd64 Packages [515 kB]
Get:8 Index of /ubuntu xenial-updates/universe i386 Packages [496 kB]
Fetched 1,317 kB in 30s (43.7 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).
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).
git is already the newest version (1:2.7.4-0ubuntu1.2).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.8).
The following package was automatically installed and is no longer required:
snap-confine
Use ‘sudo apt autoremove’ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 43 not upgraded.
The directory ‘/home/fred/.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/fred/.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/fred/.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/fred/.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: ansible in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: PyYAML in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied: jinja2 in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied: paramiko in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied: pycrypto>=2.6 in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2.7/dist-packages (from jinja2->ansible)
Requirement already satisfied: pynacl>=1.0.1 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible)
Requirement already satisfied: pyasn1>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible)
Requirement already satisfied: bcrypt>=3.1.3 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible)
Requirement already satisfied: cryptography>=1.1 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible)
Requirement already satisfied: six in /usr/local/lib/python2.7/dist-packages (from pynacl>=1.0.1->paramiko->ansible)
Requirement already satisfied: cffi>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from pynacl>=1.0.1->paramiko->ansible)
Requirement already satisfied: ipaddress in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied: idna>=2.1 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied: enum34 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.4.1->pynacl>=1.0.1->paramiko->ansible)
Traceback (most recent call last):
File “install.py”, line 381, in
install_bench(args)
File “install.py”, line 98, in install_bench
run_playbook(‘develop/create_user.yml’, extra_vars=extra_vars)
File “install.py”, line 309, in run_playbook
args.extend([‘-e’, get_extra_vars_json(extra_vars)])
File “install.py”, line 300, in get_extra_vars_json
with open(json_path, mode=‘w’) as j:
IOError: [Errno 13] Permission denied: ‘/tmp/extra_vars.json’

try command with sudo

@Fred1

You need to create “frappe” user with sudo privileges than login into the VM with that user and begin your install process

Regards
Saiid

1 Like

I don’t think that’s correct. The frappe user is created by the script at installation time. I even think the --user frappe option was not even necessary. Only if you wanted another user then the default frappe, you’d use the --user [username] option

As you said a non-root user with sudo privileges is required to run the script successfully.

True, the user does not have to be “frappe” specifically, However, from all installs I’ve made, makes life a lot easier since that seems to be the user that is referenced in the install script and the script does not always create the user frappe unfortunately.

1 Like

ok, then it’s theoretically not required to create the frappe user before running the install script, but practically it’s a good idea to do so.

thanks for sharing.

This is the error message i got when i created frappe as a user with sudo privilege
frappe@fred-VirtualBox:~$ sudo python install.py --production --user frappe
Get:1 Index of /ubuntu xenial-security InRelease [102 kB]
Hit:2 Index of /ubuntu xenial InRelease
Get:3 Index of /ubuntu xenial-updates InRelease [102 kB]
Hit:4 http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu xenial InRelease
Get:5 Index of /ubuntu xenial-backports InRelease [102 kB]
Hit:6 https://deb.nodesource.com/node_6.x xenial InRelease
Fetched 306 kB in 4s (75.2 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).
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).
git is already the newest version (1:2.7.4-0ubuntu1.2).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.8).
The following package was automatically installed and is no longer required:
snap-confine
Use ‘sudo apt autoremove’ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
The directory ‘/home/frappe/.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/frappe/.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/frappe/.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/frappe/.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: ansible in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: PyYAML in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied: jinja2 in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied: paramiko in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied: pycrypto>=2.6 in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2.7/dist-packages (from jinja2->ansible)
Requirement already satisfied: pynacl>=1.0.1 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible)
Requirement already satisfied: pyasn1>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible)
Requirement already satisfied: bcrypt>=3.1.3 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible)
Requirement already satisfied: cryptography>=1.1 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible)
Requirement already satisfied: six in /usr/local/lib/python2.7/dist-packages (from pynacl>=1.0.1->paramiko->ansible)
Requirement already satisfied: cffi>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from pynacl>=1.0.1->paramiko->ansible)
Requirement already satisfied: ipaddress in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied: idna>=2.1 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied: enum34 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.4.1->pynacl>=1.0.1->paramiko->ansible)
[WARNING]: Host file not found: /etc/ansible/hosts

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

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

TASK [Gathering Facts] *********************************************************
ok: [localhost]

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

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

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

TASK [Set /tmp/.bench folder perms] ********************************************
ok: [localhost]

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

Passwords saved at ~/passwords.txt
[WARNING]: Host file not found: /etc/ansible/hosts

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

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

TASK [Gathering Facts] *********************************************************
ok: [localhost]

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

TASK [Gathering Facts] *********************************************************
ok: [localhost]

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

TASK [Gathering Facts] *********************************************************
skipping: [localhost]

TASK [install prequisites] *****************************************************
skipping: [localhost] => (item=[])

TASK [cask installs] ***********************************************************
skipping: [localhost] => (item=wkhtmltopdf)

TASK [Install MySQLdb in global env] *******************************************
skipping: [localhost]

TASK [Add configuration] *******************************************************
skipping: [localhost]

TASK [restart mysql linux] *****************************************************
skipping: [localhost]

TASK [Set root Password] *******************************************************
skipping: [localhost]

TASK [add launchagents folder mac] *********************************************
skipping: [localhost]

TASK [add mysql to mac startup] ************************************************
skipping: [localhost]

TASK [stop mysql mac] **********************************************************
skipping: [localhost]

TASK [start mysql mac] *********************************************************
skipping: [localhost]

TASK [Check if /tmp/.bench exists] *********************************************
skipping: [localhost]

TASK [Check if bench_repo_path exists] *****************************************
skipping: [localhost]

TASK [move /tmp/.bench if it exists] *******************************************
skipping: [localhost]

TASK [install bench] ***********************************************************
skipping: [localhost]

TASK [Overwrite bench if required] *********************************************
skipping: [localhost]

TASK [Check whether bench exists] **********************************************
skipping: [localhost]

TASK [init bench] **************************************************************
skipping: [localhost]

TASK [setup config] ************************************************************
skipping: [localhost]

TASK [install frappe app] ******************************************************
skipping: [localhost]

TASK [setup procfile] **********************************************************
skipping: [localhost]

TASK [setup redis] *************************************************************
skipping: [localhost]

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

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [install prequisites] *****************************************************
ok: [localhost] => (item=[u’build-essential’, u’redis-server’, u’software-properties-common’, u’libxrender1’, u’libxext6’, u’xfonts-75dpi’, u’xfonts-base’, u’libjpeg8-dev’, u’zlib1g-dev’, u’libfreetype6-dev’, u’liblcms2-dev’, u’libwebp-dev’, u’python-tk’, u’apt-transport-https’, u’libsasl2-dev’, u’libldap2-dev’])

TASK [install pillow prerequisites for Ubuntu < 14.04] *************************
skipping: [localhost] => (item=[])

TASK [install pillow prerequisites for Ubuntu >= 14.04] ************************
ok: [localhost] => (item=[u’libtiff5-dev’, u’tcl8.6-dev’, u’tk8.6-dev’])

TASK [Add apt key for node repo] ***********************************************
ok: [localhost]

TASK [Add repo] ****************************************************************
ok: [localhost]

TASK [Install nodejs 6.x] ******************************************************
ok: [localhost]

TASK [Add apt key for mariadb for Ubuntu < 16.04] ******************************
skipping: [localhost]

TASK [Add apt key for mariadb for Ubuntu >= 16.04] *****************************
ok: [localhost]

TASK [Add apt repository] ******************************************************
ok: [localhost]

TASK [Unattended package installation] *****************************************
changed: [localhost]

TASK [apt-get install] *********************************************************
ok: [localhost] => (item=[u’mariadb-server’, u’mariadb-client’, u’mariadb-common’, u’libmariadbclient-dev’])

TASK [download wkthmltox linux] ************************************************
ok: [localhost]

TASK [Creates directory] *******************************************************
ok: [localhost]

TASK [unarchive wkhtmltopdf] ***************************************************
ok: [localhost]

TASK [copy to /usr/local/bin] **************************************************
ok: [localhost]

TASK [make wkhtmltopdf executable] *********************************************
ok: [localhost]

TASK [Install MySQLdb in global env] *******************************************
ok: [localhost]

TASK [Add configuration] *******************************************************
changed: [localhost]

TASK [restart mysql linux] *****************************************************
changed: [localhost]

TASK [Set root Password] *******************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“mysqladmin”, “-u”, “root”, “password”, “caroline@123456”], “delta”: “0:00:00.011748”, “end”: “2017-08-12 20:27:37.230246”, “failed”: true, “rc”: 1, “start”: “2017-08-12 20:27:37.218498”, “stderr”: “\u0007mysqladmin: connect to server at ‘localhost’ failed\nerror: ‘Access denied for user ‘root’@‘localhost’ (using password: NO)’”, “stderr_lines”: [“\u0007mysqladmin: connect to server at ‘localhost’ failed”, “error: ‘Access denied for user ‘root’@‘localhost’ (using password: NO)’”], “stdout”: “”, “stdout_lines”: []}
…ignoring

TASK [add launchagents folder mac] *********************************************
skipping: [localhost]

TASK [add mysql to mac startup] ************************************************
skipping: [localhost]

TASK [stop mysql mac] **********************************************************
skipping: [localhost]

TASK [start mysql mac] *********************************************************
skipping: [localhost]

TASK [debug] *******************************************************************
ok: [localhost] => {
“run_travis”: false
}

TASK [Check if /tmp/.bench exists] *********************************************
ok: [localhost]

TASK [Check if bench_repo_path exists] *****************************************
ok: [localhost]

TASK [move /tmp/.bench if it exists] *******************************************
skipping: [localhost]

TASK [install bench] ***********************************************************
changed: [localhost]

TASK [Overwrite bench if required] *********************************************
skipping: [localhost]

TASK [Check whether bench exists] **********************************************
ok: [localhost]

TASK [init bench] **************************************************************
skipping: [localhost]

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

TASK [install frappe app] ******************************************************
ok: [localhost]

TASK [setup procfile] **********************************************************
skipping: [localhost]

TASK [setup redis] *************************************************************
skipping: [localhost]

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

TASK [Gathering Facts] *********************************************************
skipping: [localhost]

TASK [development tools package] ***********************************************
skipping: [localhost]

TASK [install prequisites] *****************************************************
skipping: [localhost] => (item=[])

TASK [Import Node source RPM key] **********************************************
skipping: [localhost]

TASK [Add Node Repo] ***********************************************************
skipping: [localhost]

TASK [Install nodejs] **********************************************************
skipping: [localhost]

TASK [Add repository] **********************************************************
skipping: [localhost]

TASK [Install MariaDB] *********************************************************
skipping: [localhost] => (item=[])

TASK [download wkthmltox linux] ************************************************
skipping: [localhost]

TASK [Creates directory] *******************************************************
skipping: [localhost]

TASK [unarchive wkhtmltopdf] ***************************************************
skipping: [localhost]

TASK [copy to /usr/local/bin] **************************************************
skipping: [localhost]

TASK [make wkhtmltopdf executable] *********************************************
skipping: [localhost]

TASK [Install MySQLdb in global env] *******************************************
skipping: [localhost]

TASK [Add configuration] *******************************************************
skipping: [localhost]

TASK [restart mysql linux] *****************************************************
skipping: [localhost]

TASK [Set root Password] *******************************************************
skipping: [localhost]

TASK [add launchagents folder mac] *********************************************
skipping: [localhost]

TASK [add mysql to mac startup] ************************************************
skipping: [localhost]

TASK [stop mysql mac] **********************************************************
skipping: [localhost]

TASK [start mysql mac] *********************************************************
skipping: [localhost]

TASK [Check if /tmp/.bench exists] *********************************************
skipping: [localhost]

TASK [Check if bench_repo_path exists] *****************************************
skipping: [localhost]

TASK [move /tmp/.bench if it exists] *******************************************
skipping: [localhost]

TASK [install bench] ***********************************************************
skipping: [localhost]

TASK [Overwrite bench if required] *********************************************
skipping: [localhost]

TASK [Check whether bench exists] **********************************************
skipping: [localhost]

TASK [init bench] **************************************************************
skipping: [localhost]

TASK [setup config] ************************************************************
skipping: [localhost]

TASK [install frappe app] ******************************************************
skipping: [localhost]

TASK [setup procfile] **********************************************************
skipping: [localhost]

TASK [setup redis] *************************************************************
skipping: [localhost]

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

TASK [Gathering Facts] *********************************************************
skipping: [localhost]

TASK [Add dotdeb apt repository key for Debian < 8] ****************************
skipping: [localhost]

TASK [Add dotdeb apt repository for redis-server for Debian < 8] ***************
skipping: [localhost]

TASK [install prequisites] *****************************************************
skipping: [localhost] => (item=[])

TASK [install pillow prerequisites for Debian < 8] *****************************
skipping: [localhost] => (item=[])

TASK [install pillow prerequisites for Debian >= 8] ****************************
skipping: [localhost] => (item=[])

TASK [Add apt key for node repo] ***********************************************
skipping: [localhost]

TASK [Add repo] ****************************************************************
skipping: [localhost]

TASK [Install nodejs 6.x] ******************************************************
skipping: [localhost]

TASK [Add apt key for mariadb for Debian <= 8] *********************************
skipping: [localhost]

TASK [Add apt repository] ******************************************************
skipping: [localhost]

TASK [Unattended package installation] *****************************************
skipping: [localhost]

TASK [apt-get install] *********************************************************
skipping: [localhost] => (item=[])

TASK [download wkthmltox linux] ************************************************
skipping: [localhost]

TASK [Creates directory] *******************************************************
skipping: [localhost]

TASK [unarchive wkhtmltopdf] ***************************************************
skipping: [localhost]

TASK [copy to /usr/local/bin] **************************************************
skipping: [localhost]

TASK [make wkhtmltopdf executable] *********************************************
skipping: [localhost]

TASK [Install MySQLdb in global env] *******************************************
skipping: [localhost]

TASK [Add configuration] *******************************************************
skipping: [localhost]

TASK [restart mysql linux] *****************************************************
skipping: [localhost]

TASK [Set root Password] *******************************************************
skipping: [localhost]

TASK [add launchagents folder mac] *********************************************
skipping: [localhost]

TASK [add mysql to mac startup] ************************************************
skipping: [localhost]

TASK [stop mysql mac] **********************************************************
skipping: [localhost]

TASK [start mysql mac] *********************************************************
skipping: [localhost]

TASK [debug] *******************************************************************
skipping: [localhost]

TASK [Check if /tmp/.bench exists] *********************************************
skipping: [localhost]

TASK [Check if bench_repo_path exists] *****************************************
skipping: [localhost]

TASK [move /tmp/.bench if it exists] *******************************************
skipping: [localhost]

TASK [install bench] ***********************************************************
skipping: [localhost]

TASK [Overwrite bench if required] *********************************************
skipping: [localhost]

TASK [Check whether bench exists] **********************************************
skipping: [localhost]

TASK [init bench] **************************************************************
skipping: [localhost]

TASK [setup config] ************************************************************
skipping: [localhost]

TASK [install frappe app] ******************************************************
skipping: [localhost]

TASK [setup procfile] **********************************************************
skipping: [localhost]

TASK [setup redis] *************************************************************
skipping: [localhost]

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

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Add nginx apt repository key for Debian < 8] *****************************
skipping: [localhost]

TASK [Add nginx apt repository for Debian < 8] *********************************
skipping: [localhost]

TASK [Install production pre-requisites] ***************************************
ok: [localhost] => (item=[u’nginx’, u’screen’, u’vim’, u’htop’, u’git’, u’postfix’, u’supervisor’])

TASK [Install production pre-requisites] ***************************************
skipping: [localhost] => (item=[])

TASK [Install supervisor using yum for Centos 7] *******************************
skipping: [localhost]

TASK [Rename default nginx.conf to nginx.conf.old] *****************************
changed: [localhost]

TASK [Copy the nginx_config template] ******************************************
changed: [localhost]

TASK [Reload the nginx service] ************************************************
changed: [localhost]

TASK [Set InnoDB buffer pool] **************************************************
skipping: [localhost]

TASK [Set InnoDB buffer pool] **************************************************
changed: [localhost]

TASK [Enable nginx, mysql, and redis] ******************************************
ok: [localhost] => (item=nginx)
ok: [localhost] => (item=mysql)

TASK [Enable redis.service on centos] ******************************************
skipping: [localhost]

TASK [Enable redis-server.service on ubuntu] ***********************************
ok: [localhost]

TASK [Check whether default supervisor.conf exists] ****************************
skipping: [localhost]

TASK [Check whether default supervisor.conf exists] ****************************
ok: [localhost]

TASK [insert/update inputrc for history] ***************************************
ok: [localhost]

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

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Check whether a site exists] *********************************************
ok: [localhost]

TASK [Create new site] *********************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “new-site”, “site1.local”, “–admin-password”, “caroline@123456”, “–mariadb-root-password”, “caroline@123456”], “delta”: “0:00:00.831017”, “end”: “2017-08-12 20:28:13.240510”, “failed”: true, “rc”: 1, “start”: “2017-08-12 20:28:12.409493”, “stderr”: “INFO:bench.utils:creating new site site1.local\nINFO:bench.utils:/home/frappe/frappe-bench/env/bin/frappe site1.local --install 1bd3e0294d --root_password caroline@123456 --admin_password caroline@123456\n/bin/sh: 1: /home/frappe/frappe-bench/env/bin/frappe: not found\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/python2.7/dist-packages/click/core.py", line 722, in call\n return self.main(*args, **kwargs)\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main\n rv = self.invoke(ctx)\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/usr/local/lib/python2.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/click/core.py", line 535, in invoke\n return callback(*args, **kwargs)\n File "/home/frappe/.bench/bench/commands/make.py", line 58, in new_site\n new_site(site, mariadb_root_password=mariadb_root_password, admin_password=admin_password)\n File "/home/frappe/.bench/bench/utils.py", line 177, in new_site\n ), cwd=os.path.join(bench_path, ‘sites’))\n File "/home/frappe/.bench/bench/utils.py", line 140, in exec_cmd\n raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: /home/frappe/frappe-bench/env/bin/frappe site1.local --install 1bd3e0294d --root_password caroline@123456 --admin_password caroline@123456”, “stderr_lines”: [“INFO:bench.utils:creating new site site1.local”, “INFO:bench.utils:/home/frappe/frappe-bench/env/bin/frappe site1.local --install 1bd3e0294d --root_password caroline@123456 --admin_password caroline@123456”, “/bin/sh: 1: /home/frappe/frappe-bench/env/bin/frappe: not found”, “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/python2.7/dist-packages/click/core.py", line 722, in call”, " return self.main(*args, **kwargs)“, " File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main”, " rv = self.invoke(ctx)“, " File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke”, " return _process_result(sub_ctx.command.invoke(sub_ctx))“, " File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke”, " return ctx.invoke(self.callback, **ctx.params)“, " File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke”, " return callback(*args, **kwargs)“, " File "/home/frappe/.bench/bench/commands/make.py", line 58, in new_site”, " new_site(site, mariadb_root_password=mariadb_root_password, admin_password=admin_password)“, " File "/home/frappe/.bench/bench/utils.py", line 177, in new_site”, " ), cwd=os.path.join(bench_path, ‘sites’))“, " File "/home/frappe/.bench/bench/utils.py", line 140, in exec_cmd”, " raise CommandFailedError(cmd)", “bench.utils.CommandFailedError: /home/frappe/frappe-bench/env/bin/frappe site1.local --install 1bd3e0294d --root_password caroline@123456 --admin_password caroline@123456”], “stdout”: “frappe app is not installed. Run the following command to install frappe\nbench get-app GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript”, “stdout_lines”: [“frappe app is not installed. Run the following command to install frappe”, “bench get-app GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript”]}
to retry, use: --limit @/tmp/.bench/playbooks/production/install.retry

PLAY RECAP *********************************************************************
localhost : ok=40 changed=9 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 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘production/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2
@saidsl and @vrms kindly state step by step to install this easy script on VM
Fred

@Fred1

It looks like the installation is not able to connect to MySQL check your username & password.

There is only the following from step by step installation aimed at a manual install.

1 Like

The log reports “frappe app is not installed. Run the following command to install frappe”

bench get-app GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

So maybe run the above command as recommended?

1 Like

don’t you have to define the name of the app in that command? like …

  • bench get-app [appname] [url]

or in our concrete example

  • bench get-app frappe https://github.com/frappe/frappe.git

@clarkej @vrms I ran the command in bench, it failed saying the app is installed already . I ran with root privilege,it says I cannot run it as root.sirs,what do I do

Since this a fresh install with no data, then this would be worth a try:

bench reinstall

Dear all friends,thanks for all your contributions.To resolve the problem,i just ran the script as the root and all went well.Thanks