ERPNext easy-install fails: AttributeError: module 'lib' has no attribute 'ERR_load_RAND_strings'

Within the last 24 hours I have been attempting to use easy-install (on a fresh install of Debian 10). A similar install was completed successfully a few weeks ago.

But now the script fails this error:

AttributeError: module ‘lib’ has no attribute ‘ERR_load_RAND_strings’

Also, shortly before this error began to appear some previous attempts to run the easy-install script were failing at the stage of installing the erpnext app, with the error:

Could not find app “erpnext”

The erpnext app was not in the bench “apps” directory and attempts to manually fetch the erpnext app using bench get-app would just fail silently.

Is the repo in a state of flux at the moment that is affecting the easy-install script? Is there a work-around to get erpnext installed using the easy-install script?

Thanks.


Forgot to mention that all attempts are for a production install. Command line is:

% sudo LC_ALL=C.UTF-8 ./install.py --production --user=<frappe-user>

End of install log file is included below showing the error detail.

TASK [common : install pillow prerequisites for Debian >= 10] ******************
task path: /tmp/.bench/bench/playbooks/roles/common/tasks/debian.yml:37
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c ‘echo ~root && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /root/.ansible/tmp”&& mkdir /root/.ansible/tmp/ansible-tmp-1632984347.968369-12014-9352764665991 && echo ansible-tmp-1632984347.968369-12014-9352764665991=“echo /root/.ansible/tmp/ansible-tmp-1632984347.968369-12014-9352764665991” ) && sleep 0’
Using module file /usr/local/lib/python3.7/dist-packages/ansible/modules/packaging/os/apt.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-8334k61v_3oi/tmprsc97sm_ TO /root/.ansible/tmp/ansible-tmp-1632984347.968369-12014-9352764665991/AnsiballZ_apt.py
<127.0.0.1> EXEC /bin/sh -c ‘chmod u+x /root/.ansible/tmp/ansible-tmp-1632984347.968369-12014-9352764665991/ /root/.ansible/tmp/ansible-tmp-1632984347.968369-12014-9352764665991/AnsiballZ_apt.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1632984347.968369-12014-9352764665991/AnsiballZ_apt.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘rm -f -r /root/.ansible/tmp/ansible-tmp-1632984347.968369-12014-9352764665991/ > /dev/null 2>&1 && sleep 0’
fatal: [localhost]: FAILED! => {
“changed”: false,
“module_stderr”: “/root/.ansible/tmp/ansible-tmp-1632984347.968369-12014-9352764665991/AnsiballZ_apt.py:18: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module’s documentation for alternative uses\n import imp\nTraceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1632984347.968369-12014-9352764665991/AnsiballZ_apt.py", line 114, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1632984347.968369-12014-9352764665991/AnsiballZ_apt.py", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1632984347.968369-12014-9352764665991/AnsiballZ_apt.py", line 49, in invoke_module\n imp.load_module(‘main’, mod, module, MOD_DESC)\n File "/usr/lib/python3.7/imp.py", line 234, in load_module\n return load_source(name, filename, file)\n File "/usr/lib/python3.7/imp.py", line 169, in load_source\n module = _exec(spec, sys.modules[name])\n File "", line 630, in _exec\n File "", line 728, in exec_module\n File "", line 219, in _call_with_frames_removed\n File "/tmp/ansible_apt_payload_nu9ikh08/main.py", line 281, in \n File "", line 983, in _find_and_load\n File "", line 967, in _find_and_load_unlocked\n File "", line 638, in _load_backward_compatible\n File "/tmp/ansible_apt_payload_nu9ikh08/ansible_apt_payload.zip/ansible/module_utils/urls.py", line 97, in \n File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in \n import OpenSSL.SSL\n File "/usr/local/lib/python3.7/dist-packages/OpenSSL/init.py", line 8, in \n from OpenSSL import rand, crypto, SSL\n File "/usr/local/lib/python3.7/dist-packages/OpenSSL/rand.py", line 211, in \n _lib.ERR_load_RAND_strings()\nAttributeError: module ‘lib’ has no attribute ‘ERR_load_RAND_strings’\n”,
“module_stdout”: “”,
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,
rc": 1
}
PLAY RECAP *********************************************************************
localhost : ok=5 changed=2 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0
Install script run at 06:44 on 2021-09-30

Also after getting this failure, running install.py again results in many warnings like this:

[WARNING]: Skipping plugin (/usr/local/lib/python3.7/dist-packages/ansible/plugins/connection/httpapi.py) as it seems to be invalid: module ‘lib’ has no attribute ‘ERR_load_RAND_strings’

This message is repeated for at least the following python modules:

connection/httpapi.py
connection/vmware_tools.pycallback/foreman.py
callback/grafana_annotations.py
callback/hipchat.py
callback/slack.py
callback/splunk.py
callback/sumologic.py

I think this post from @bkm explained it all.

We should either use a container installation or a manual installation :slight_smile:

That very same post have a 24 step-by-step on how to install manually (I went that route because I already have Proxmox servers available in my office). I was able to do it in my Proxmox server with a CT based on Ubuntu Server 20.04 LTS. I now have a template that I can easily deploy a new server once needed.

I bet it would work just fine with Debian as well.

Everything just works and I am completely new to ERPNext, Node JS, Frappe, Python, etc.

Take look and let us know how it goes.

Thanks.

Unfortunately I ended up going with a clone of the previous install for now. It was a quicker solution but is not an approach that I like. I hope to have a chance to try the manual installation soon and/or resolve the problems with the easy-install script.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.