ERPNext Conference 2019* ERPNext.com Blog

Install script fails on Debian 9 [2019-07-29]


#1

Dear colleagues,

we have just observed the following error on a vanilla Debian 9 amd64:

Command

$ sudo python install.py --production

Error

fatal: [localhost]: FAILED! => {
	"changed": false,
	"cmd": "/usr/bin/apt-key adv --no-tty --keyserver hkp://keyserver.ubuntu.com:80 --recv F1656F24C74CD1D8",
	"invocation": {
		"module_args": {
			"data": null,
			"file": null,
			"id": "0xF1656F24C74CD1D8",
			"key": null,
			"keyring": null,
			"keyserver": "hkp://keyserver.ubuntu.com:80",
			"state": "present",
			"url": null,
			"validate_certs": true
		}
	},
	"msg": "Error fetching key F1656F24C74CD1D8 from keyserver: hkp://keyserver.ubuntu.com:80",
	"rc": 2,
	"stderr": "Warning: apt-key output should not be parsed (stdout is not a terminal)\ngpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory\ngpg: connecting dirmngr at '/tmp/apt-key-gpghome.vbja1ifX81/S.dirmngr' failed: No such file or directory\ngpg: keyserver receive failed: No dirmngr\n",
	"stderr_lines": [
		"Warning: apt-key output should not be parsed (stdout is not a terminal)",
		"gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory",
		"gpg: connecting dirmngr at '/tmp/apt-key-gpghome.vbja1ifX81/S.dirmngr' failed: No such file or directory",
		"gpg: keyserver receive failed: No dirmngr"
	],
	"stdout": "Executing: /tmp/apt-key-gpghome.vbja1ifX81/gpg.1.sh --no-tty --keyserver hkp://keyserver.ubuntu.com:80 --recv F1656F24C74CD1D8\n",
	"stdout_lines": [
		"Executing: /tmp/apt-key-gpghome.vbja1ifX81/gpg.1.sh --no-tty --keyserver hkp://keyserver.ubuntu.com:80 --recv F1656F24C74CD1D8"
	]
}

Traceback (most recent call last):
  File "install.py", line 413, in <module>
	install_bench(args)
  File "install.py", line 135, in install_bench
	run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 327, in run_playbook
	success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
  File "/usr/lib/python2.7/subprocess.py", line 186, in check_call
	raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', 
'-e', '@/tmp/extra_vars.json', '--become', '--become-user=frappe']' returned non-zero exit status 2

Anyone else with the same issue?


Install error for Centos 7
#2

sudo apt install dirmngr -y


#3

Thanks @trentmu, this resolved the issue.

Had a second issue

Traceback (most recent call last):",
		  File \"/usr/local/bin/bench\", line 11, in <module>
			load_entry_point('bench', 'console_scripts', 'bench')()
		  File \"/home/frappe/.bench/bench/cli.py\", line 40, in cli
			bench_command()
		  File \"/usr/local/lib/python3.5/dist-packages/click/core.py\", line 764, in __call__
			return self.main(*args, **kwargs)
		  File \"/usr/local/lib/python3.5/dist-packages/click/core.py\", line 696, in main
			_verify_python3_env()
		  File \"/usr/local/lib/python3.5/dist-packages/click/_unicodefun.py\", line 124, in _verify_python3_env
			' mitigation steps.' + extra
		RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/en/7.x/python3/ for mitigation steps.
		
		This system supports the C.UTF-8 locale which is recommended.
		You might be able to resolve your issue by exporting the
		following environment variables:
		
		   export LC_ALL=C.UTF-8
		   export LANG=C.UTF-8

This actually resolved as it says with (not using sudo)

$ export LC_ALL=C.UTF-8
$ export LANG=C.UTF-8

Now it works like a charm!


How to install erpnext version 12 on Debian 9/10?
Error when installing using the Easy Install script
#4

Do the export commands

export LC_ALL=C.UTF-8
export LANG=C.UTF-8

need to be added to .bashrc for the user, or does it work fine from a once-off perspective?


#5

Worked once-off…


#6

:+1: Thank you!


#7

I feel stuff like this should be included in the install script. Unnecessary error.


#8

Agreed. Created a Pull Request: