Error while install erpnext

Ive run this command

sudo python install.py --develop --user frappe

and getting this error ?!!

failed: [localhost] (item=[u'build-essential', u'software-properties-common', u'dnsmasq', u'fontconfig', u'git', u'htop', u'libcrypto++-dev', u'libfreetype6-dev', u'liblcms2-dev', u'libssl-dev', u'libwebp-dev', u'libxext6', u'libxrender1', u'libxslt1-dev', u'libxslt1.1', u'libffi-dev', u'ntp', u'postfix', u'python-dev', u'python-pip', u'python-tk', u'redis-server', u'screen', u'vim', u'xfonts-75dpi', u'xfonts-base', u'zlib1g-dev', u'apt-transport-https', u'libsasl2-dev', u'libldap2-dev']) => {"cache_update_time": 1508159592, "cache_updated": false, "failed": true, "item": ["build-essential", "software-properties-common", "dnsmasq", "fontconfig", "git", "htop", "libcrypto++-dev", "libfreetype6-dev", "liblcms2-dev", "libssl-dev", "libwebp-dev", "libxext6", "libxrender1", "libxslt1-dev", "libxslt1.1", "libffi-dev", "ntp", "postfix", "python-dev", "python-pip", "python-tk", "redis-server", "screen", "vim", "xfonts-75dpi", "xfonts-base", "zlib1g-dev", "apt-transport-https", "libsasl2-dev", "libldap2-dev"], "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"  --force-yes   install 'redis-server'' failed: W: --force-yes is deprecated, use one of the options starting with --allow instead.\nE: Sub-process /usr/bin/dpkg returned an error code (1)\n", "rc": 100, "stderr": "W: --force-yes is deprecated, use one of the options starting with --allow instead.\nE: Sub-process /usr/bin/dpkg returned an error code (1)\n", "stderr_lines": ["W: --force-yes is deprecated, use one of the options starting with --allow instead.", "E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\n  libjemalloc1 redis-tools\nSuggested packages:\n  ruby-redis\nThe following NEW packages will be installed:\n  libjemalloc1 redis-server redis-tools\n0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.\nNeed to get 0 B/517 kB of archives.\nAfter this operation, 1505 kB of additional disk space will be used.\nSelecting previously unselected package libjemalloc1.\r\n(Reading database ... \r(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r(Reading database ... 70%\r(Reading database ... 75%\r(Reading database ... 80%\r(Reading database ... 85%\r(Reading database ... 90%\r(Reading database ... 95%\r(Reading database ... 100%\r(Reading database ... 280040 files and directories currently installed.)\r\nPreparing to unpack .../libjemalloc1_3.6.0-9ubuntu1_amd64.deb ...\r\nUnpacking libjemalloc1 (3.6.0-9ubuntu1) ...\r\nSelecting previously unselected package redis-tools.\r\nPreparing to unpack .../redis-tools_2%3a3.0.6-1_amd64.deb ...\r\nUnpacking redis-tools (2:3.0.6-1) ...\r\nSelecting previously unselected package redis-server.\r\nPreparing to unpack .../redis-server_2%3a3.0.6-1_amd64.deb ...\r\nUnpacking redis-server (2:3.0.6-1) ...\r\nProcessing triggers for libc-bin (2.23-0ubuntu9) ...\r\nProcessing triggers for man-db (2.7.5-1) ...\r\nProcessing triggers for systemd (229-4ubuntu19) ...\r\nProcessing triggers for ureadahead (0.100.0-19) ...\r\nSetting up libjemalloc1 (3.6.0-9ubuntu1) ...\r\nSetting up redis-tools (2:3.0.6-1) ...\r\nSetting up redis-server (2:3.0.6-1) ...\r\n\r\nConfiguration file '/etc/redis/redis.conf'\r\n ==> File on system created by you or by a script.\r\n ==> File also in package provided by package maintainer.\r\n ==> Keeping old config file as default.\r\n/usr/bin/deb-systemd-helper: error: unable to link /etc/systemd/system/redis.service to /lib/systemd/system/redis-server.service: File exists\r\nJob for redis-server.service failed because the control process exited with error code. See \"systemctl status redis-server.service\" and \"journalctl -xe\" for details.\r\ninvoke-rc.d: initscript redis-server, action \"start\" failed.\r\n* redis-server.service - Advanced key-value store\r\n   Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)\r\n   Active: activating (auto-restart) (Result: exit-code) since Mon 2017-10-16 16:14:22 AST; 3ms ago\r\n     Docs: http://redis.io/documentation,\r\n           man:redis-server(1)\r\n  Process: 59980 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf \u001b[0;1;31m(code=exited, status=1/FAILURE)\u001b[0m\r\n  Process: 59975 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=0/SUCCESS)\r\n\r\nOct 16 16:14:22 erpnext systemd[1]: \u001b[0;1;39mredis-server.service: Unit entered fail...e.\u001b[0m\r\nOct 16 16:14:22 erpnext systemd[1]: \u001b[0;1;39mredis-server.service: Failed with resul...'.\u001b[0m\r\nHint: Some lines were ellipsized, use -l to show in full.\r\ndpkg: error processing package redis-server (--configure):\r\n subprocess installed post-installation script returned error exit status 1\r\nProcessing triggers for libc-bin (2.23-0ubuntu9) ...\r\nProcessing triggers for systemd (229-4ubuntu19) ...\r\nProcessing triggers for ureadahead (0.100.0-19) ...\r\nErrors were encountered while processing:\r\n redis-server\r\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following additional packages will be installed:", "  libjemalloc1 redis-tools", "Suggested packages:", "  ruby-redis", "The following NEW packages will be installed:", "  libjemalloc1 redis-server redis-tools", "0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.", "Need to get 0 B/517 kB of archives.", "After this operation, 1505 kB of additional disk space will be used.", "Selecting previously unselected package libjemalloc1.", "(Reading database ... ", "(Reading database ... 5%", "(Reading database ... 10%", "(Reading database ... 15%", "(Reading database ... 20%", "(Reading database ... 25%", "(Reading database ... 30%", "(Reading database ... 35%", "(Reading database ... 40%", "(Reading database ... 45%", "(Reading database ... 50%", "(Reading database ... 55%", "(Reading database ... 60%", "(Reading database ... 65%", "(Reading database ... 70%", "(Reading database ... 75%", "(Reading database ... 80%", "(Reading database ... 85%", "(Reading database ... 90%", "(Reading database ... 95%", "(Reading database ... 100%", "(Reading database ... 280040 files and directories currently installed.)", "Preparing to unpack .../libjemalloc1_3.6.0-9ubuntu1_amd64.deb ...", "Unpacking libjemalloc1 (3.6.0-9ubuntu1) ...", "Selecting previously unselected package redis-tools.", "Preparing to unpack .../redis-tools_2%3a3.0.6-1_amd64.deb ...", "Unpacking redis-tools (2:3.0.6-1) ...", "Selecting previously unselected package redis-server.", "Preparing to unpack .../redis-server_2%3a3.0.6-1_amd64.deb ...", "Unpacking redis-server (2:3.0.6-1) ...", "Processing triggers for libc-bin (2.23-0ubuntu9) ...", "Processing triggers for man-db (2.7.5-1) ...", "Processing triggers for systemd (229-4ubuntu19) ...", "Processing triggers for ureadahead (0.100.0-19) ...", "Setting up libjemalloc1 (3.6.0-9ubuntu1) ...", "Setting up redis-tools (2:3.0.6-1) ...", "Setting up redis-server (2:3.0.6-1) ...", "", "Configuration file '/etc/redis/redis.conf'", " ==> File on system created by you or by a script.", " ==> File also in package provided by package maintainer.", " ==> Keeping old config file as default.", "/usr/bin/deb-systemd-helper: error: unable to link /etc/systemd/system/redis.service to /lib/systemd/system/redis-server.service: File exists", "Job for redis-server.service failed because the control process exited with error code. See \"systemctl status redis-server.service\" and \"journalctl -xe\" for details.", "invoke-rc.d: initscript redis-server, action \"start\" failed.", "* redis-server.service - Advanced key-value store", "   Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)", "   Active: activating (auto-restart) (Result: exit-code) since Mon 2017-10-16 16:14:22 AST; 3ms ago", "     Docs: http://redis.io/documentation,", "           man:redis-server(1)", "  Process: 59980 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf \u001b[0;1;31m(code=exited, status=1/FAILURE)\u001b[0m", "  Process: 59975 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=0/SUCCESS)", "", "Oct 16 16:14:22 erpnext systemd[1]: \u001b[0;1;39mredis-server.service: Unit entered fail...e.\u001b[0m", "Oct 16 16:14:22 erpnext systemd[1]: \u001b[0;1;39mredis-server.service: Failed with resul...'.\u001b[0m", "Hint: Some lines were ellipsized, use -l to show in full.", "dpkg: error processing package redis-server (--configure):", " subprocess installed post-installation script returned error exit status 1", "Processing triggers for libc-bin (2.23-0ubuntu9) ...", "Processing triggers for systemd (229-4ubuntu19) ...", "Processing triggers for ureadahead (0.100.0-19) ...", "Errors were encountered while processing:", " redis-server"]}
	to retry, use: --limit @/tmp/.bench/playbooks/develop/install.retry

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

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

Hi @kyabroudi

What os are you running. I get errors if I try easy install script on Ubuntu Desktop 14.04 LTS. No problems if I install on Ubuntu 14.04LTS server though.

regards
Hemant

Hi
This post looks similar, might be bug, not sure why from the trace.
Can you check if there is a user frappe and also check selinux status.
Thanks

Hi @Ranjith

Yes, that is my post. There is a user frappe, im not how to check the status of selinux. Im using Ubuntu 14.04, also tried it on Centos 7, but all desktop versions. The ubuntu server installed perfectly, so im thinking its some kind of check on the os and requirement installing issue.

Sorry - not really a linux expert - coming from the windows world, but this is helping to learn :wink:

regards
Hemant

am using ubuntu latest version with MATE Desktop Environment 1.12.1
looks the Redis not working well cuz I run sudo python install.py --develop --user frappe again and got this error

Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
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).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.8).
git is already the newest version (1:2.7.4-0ubuntu1.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up redis-server (2:3.0.6-1) ...
Job for redis-server.service failed because the control process exited with error code. See "systemctl status redis-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript redis-server, action "start" failed.
● redis-server.service - Advanced key-value store
   Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since ن 2017-10-16 17:57:47 AST; 4ms ago
     Docs: http://redis.io/documentation,
           man:redis-server(1)
  Process: 62202 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE)
  Process: 62198 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=0/SUCCESS)

أكت 16 17:57:47 erpnext systemd[1]: redis-server.service: Unit entered f...e.
أكت 16 17:57:47 erpnext systemd[1]: redis-server.service: Failed with re...'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package redis-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 redis-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Traceback (most recent call last):
  File "install.py", line 388, in <module>
    install_bench(args)
  File "install.py", line 21, in install_bench
    'sudo yum install -y epel-release redhat-lsb-core git python-setuptools python-devel openssl-devel libffi-devel'
  File "install.py", line 222, in run_os_command
    returncode = subprocess.check_call(command, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'sudo apt-get install -y git build-essential python-setuptools python-dev libffi-dev libssl-dev' returned non-zero exit status 100

I get this error and not sure what the status of selinux meant to be but I think its disabled on my install.

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

TASK [ntpd : enable ntpd] *************************************************************************************
skipping: [localhost]

TASK [ntpd : Install ntpd] ************************************************************************************
ok: [localhost] => (item=[u’ntp’, u’ntpdate’])

TASK [ntpd : enable ntpd] *************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Error loading unit file ‘ntp’: org.freedesktop.DBus.Error.FileNotFound "No such file or directory"”}
to retry, use: --limit @/tmp/.bench/playbooks/production/install.retry

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

Traceback (most recent call last):
File “install.py”, line 388, in
install_bench(args)
File “install.py”, line 114, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 326, 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’, ‘production/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=hemant’]’ returned non-zero exit status 2
hemant@ubuntu:~$ sestatus
SELinux status: disabled

same errer here

Traceback (most recent call last):
File “install.py”, line 388, in
install_bench(args)
File “install.py”, line 111, in install_bench
run_playbook(‘develop/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 326, 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’, ‘develop/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2