Need help in improving development installer

During first install type the root password that you want to set.

During subsequent prompts repeat the old password

@anand That’s what I did. And yet it trhows the error. Here is full trace when the ansible is running. Can you find anything wrong? IN th ebeginning, it asks for the mysql root password once, and thats it. It doesn’t ask after that.

Cloning into '/usr/local/frappe/bench-repo'... remote: Counting objects: 202, done. remote: Compressing objects: 100% (158/158), done. remote: Total 202 (delta 4), reused 164 (delta 3), pack-reused 0 Receiving objects: 100% (202/202), 7.04 MiB | 190.00 KiB/s, done. Resolving deltas: 100% (4/4), done. Checking connectivity... done. SUDO password: [WARNING]: provided hosts list is empty, only localhost is available

MySQL Root Password:

PLAY ***************************************************************************

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

PLAY ***************************************************************************

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

TASK [install prequisites] *****************************************************
skipping: [localhost] => (item=cmake)
skipping: [localhost] => (item=redis)
skipping: [localhost] => (item=mariadb)
skipping: [localhost] => (item=nodejs)

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

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

PLAY ***************************************************************************

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

TASK [install prequisites] *****************************************************
changed: [localhost] => (item=[u’build-essential’, u’redis-server’, u’nodejs’, u’npm’, 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’])

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

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

TASK [include] *****************************************************************
included: /usr/local/frappe/bench-repo/playbooks/develop/includes/mariadb_ubuntu.yml for localhost

TASK [Add apt key] *************************************************************
changed: [localhost]

TASK [Add apt repositry] *******************************************************
changed: [localhost]

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

TASK [include] *****************************************************************
included: /usr/local/frappe/bench-repo/playbooks/develop/includes/wkhtmltopdf_ubuntu_debian.yml for localhost

TASK [Download wkhtmltopdf] ****************************************************
changed: [localhost]

TASK [Install wkhtmltopdf deb] *************************************************
changed: [localhost]

TASK [Download wkhtmltopdf for Ubuntu Wily] ************************************
skipping: [localhost]

TASK [Install wkhtmltopdf deb for Ubuntu Wily] *********************************
skipping: [localhost]

TASK [include] *****************************************************************
included: /usr/local/frappe/bench-repo/playbooks/develop/includes/setup_mariadb.yml for localhost

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

TASK [Set root Password] *******************************************************
skipping: [localhost] => (item=localhost)

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

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

TASK [include] *****************************************************************
included: /usr/local/frappe/bench-repo/playbooks/develop/includes/setup_bench.yml for localhost

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

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

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

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

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

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

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

PLAY ***************************************************************************

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

TASK [add epel repo] ***********************************************************
skipping: [localhost]

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

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

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

PLAY RECAP *********************************************************************
localhost : ok=25 changed=12 unreachable=0 failed=0

@anand I changed the root pwd from this link http://www.liberiangeek.net/2014/10/reset-root-password-mariadb-centos-7/ (followed ubuntu instructions) (thanks @neilLasrado) and it is fine now. Thanks @anand

@anand

I tried to installed it in ubuntu 14.04 LTS trusty but there is an error.

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

TASK [apt-get install] *********************************************************
failed: [localhost] => (item=[u'mariadb-server', u'mariadb-client', u'mariadb-common', u'libmariadbclient-dev']) => {"cache_update_time": 1459144606, "cache_updated": true, "failed": true, "item": ["mariadb-server", "mariadb-client", "mariadb-common", "libmariadbclient-dev"], "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"   install 'mariadb-server' 'mariadb-client' 'mariadb-common' 'libmariadbclient-dev'' failed: E: Unable to correct problems, you have held broken packages.\n", "stderr": "E: Unable to correct problems, you have held broken packages.\n", "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n libmariadbclient-dev : Depends: libmariadbclient18 (>= 10.1.13+maria-1~trusty) but it is not going to be installed\n mariadb-client : Depends: mariadb-client-10.1 (= 10.1.13+maria-1~trusty) but it is not going to be installed\n mariadb-server : Depends: mariadb-server-10.1 (= 10.1.13+maria-1~trusty) but it is not going to be installed\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " libmariadbclient-dev : Depends: libmariadbclient18 (>= 10.1.13+maria-1~trusty) but it is not going to be installed", " mariadb-client : Depends: mariadb-client-10.1 (= 10.1.13+maria-1~trusty) but it is not going to be installed", " mariadb-server : Depends: mariadb-server-10.1 (= 10.1.13+maria-1~trusty) but it is not going to be installed"]}
	to retry, use: --limit @develop/install.retry

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

Traceback (most recent call last):
  File "install.py", line 153, in <module>
    install_bench(args)
  File "install.py", line 58, in install_bench
    run_playbook('develop/install.yml', sudo=True)
  File "install.py", line 131, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(bench_repo, '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', '-K']' returned non-zero exit status 2
chris@chris:~$ 

Any tips?

@ccfiel you have unmet dependencies while installing mariadb. Or some broken packages. If you can try installing mariadb separately, you may be able to solve the dependencies.

I have seen 2 things work for me in the past in such situations (not scientific)-

  1. Doing an apt-get update & apt-get upgrade and trying the install again
  2. Installing the packages & dependencies manually as the error list describes.

Kirthi

1 Like

@kirthi thanks! I just doing number 2

    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python2.7/locale.py", line 579, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting
Traceback (most recent call last):
  File "install.py", line 153, in <module>
    install_bench(args)
  File "install.py", line 45, in install_bench
    'pip': 'sudo pip install ansible'
  File "install.py", line 113, in run_os_command
    returncode = subprocess.check_call(command, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'sudo pip install ansible' returned non-zero exit status 1

This is the error I am getting on ubuntu 15.10

Ok I think I got it working.

Here is what I had issue with. Installation of Ansible which was caused by locale setting. Which I was able to solve by regenerating the locale setting and putting

LC_ALL=en_GB.UTF-8

in
/etc/default/locale

Ok didnt work actually.

TASK [apt-get install] *********************************************************
failed: [localhost] => (item=[u'mariadb-server', u'mariadb-client', u'mariadb-common', u'libmariadbclient-dev']) => {"cache_update_time": 1459250227, "cache_updated": true, "failed": true, "item": ["mariadb-server", "mariadb-client", "mariadb-common", "libmariadbclient-dev"], "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"   install 'mariadb-client'' failed: E: Unable to correct problems, you have held broken packages.\n", "stderr": "E: Unable to correct problems, you have held broken packages.\n", "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n mariadb-client : Depends: mariadb-client-10.1 (= 10.1.13+maria-1~wily) but it is not going to be installed\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " mariadb-client : Depends: mariadb-client-10.1 (= 10.1.13+maria-1~wily) but it is not going to be installed"]}
    to retry, use: --limit @develop/install.retry

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

Traceback (most recent call last):
  File "install.py", line 153, in <module>
    install_bench(args)
  File "install.py", line 58, in install_bench
    run_playbook('develop/install.yml', sudo=True)
  File "install.py", line 131, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(bench_repo, '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', '-K']' returned non-zero exit status 2

Ok So I got it working. Problems I faced

  1. locale setting - LC_ALL
  2. Mariadb error - I manually installed it.

The LC_ALL error started with the new pip version. Hopefully they will address it soon.

Yes also I installed mariadb manually

@ccfiel @vivek

Can you please tell what version of Linux did you face this problem. To enable better insight into the installation failure and resolution of the problem

1 Like

Ubuntu 14.04 64 bit

ubuntu 15.10 64bit

@shreyasp today I also got error while installing erpnext.
and solved using sudo apt-get install --reinstall language-pack-en

refernce:
https://github.com/frappe/erpnext/issues/5083

1 Like

Hi @anand, guys,

I get the following error on Mac OS X. Any help will be appreciated.

TASK [restart mysql] ***********************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "get_service_tools not implemented on target platform"}
	to retry, use: --limit @develop/install.retry

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

Traceback (most recent call last):
  File "install.py", line 153, in <module>
    install_bench(args)
  File "install.py", line 58, in install_bench
    run_playbook('develop/install.yml', sudo=True)
  File "install.py", line 131, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(bench_repo, 'playbooks'))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'develop/install.yml', '-K']' returned non-zero exit status 2

Regards,
cksgb

Hi @anand,

Just following up on the previous question. Is there any help you can provide with running the installer on OS X?

Thanks,
cksgb

Hi @Chude_Osiegbu

The development installer works on MacOSX. GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps

Has anyone been successful getting the installer to work in a docker container for ubuntu?

I can’t seem to get the container to switch to a non-root sudoer in the container, and google didn’t seem to have the answer.

Will split into a new topic if needed