Install Error on Ubuntu 16.04

Hello all
I’m trying to install frappe by commend sudo python install.py --production on a fresh server but got this error.
when “Add apt key for node repo”

TASK [Add apt key for node repo] ***********************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Unsupported proxy scheme: https. Currently ansible only supports HTTP proxies."}

Full Error log.

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

TASK [setup] *******************************************************************
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] ***********************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Unsupported proxy scheme: https. Currently ansible only supports HTTP proxies."}

NO MORE HOSTS LEFT *************************************************************
	to retry, use: --limit @production/install.retry

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

Traceback (most recent call last):
  File "install.py", line 351, in <module>
    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 301, 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

Apparently there are issues when installing on ubuntu 16.04, if possible try it on Ubuntu 14.04.5 LTS (Trusty Tahr).

Am running my installation on 14.04

Cheers

I Solved this problem vi

1. Create a new file in:

" /tmp/nodesource.gpg.key"

this file contain the key:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.1.6
Comment: Hostname: keyserver.ubuntu.com

mQINBFObJLYBEADkFW8HMjsoYRJQ4nCYC/6Eh0yLWHWfCh+/9ZSIj4w/pOe2V6V+W6DHY3kK
3a+2bxrax9EqKe7uxkSKf95gfns+I9+R+RJfRpb1qvljURr54y35IZgsfMG22Np+TmM2RLgd
FCZa18h0+RbH9i0b+ZrB9XPZmLb/h9ou7SowGqQ3wwOtT3Vyqmif0A2GCcjFTqWW6TXaY8eZ
J9BCEqW3k/0Cjw7K/mSy/utxYiUIvZNKgaG/P8U789QyvxeRxAf93YFAVzMXhoKxu12IuH4V
nSwAfb8gQyxKRyiGOUwk0YoBPpqRnMmDDl7SdmY3oQHEJzBelTMjTM8AjbB9mWoPBX5G8t4u
47/FZ6PgdfmRg9hsKXhkLJc7C1btblOHNgDx19fzASWX+xOjZiKpP6MkEEzq1bilUFul6RDt
xkTWsTa5TGixgCB/G2fK8I9JL/yQhDc6OGY9mjPOxMb5PgUlT8ox3v8wt25erWj9z30QoEBw
fSg4tzLcJq6N/iepQemNfo6Is+TG+JzI6vhXjlsBm/Xmz0ZiFPPObAH/vGCY5I6886vXQ7ft
qWHYHT8jz/R4tigMGC+tvZ/kcmYBsLCCI5uSEP6JJRQQhHrCvOX0UaytItfsQfLmEYRd2F72
o1yGh3yvWWfDIBXRmaBuIGXGpajC0JyBGSOWb9UxMNZY/2LJEwARAQABtB9Ob2RlU291cmNl
IDxncGdAbm9kZXNvdXJjZS5jb20+iQI4BBMBAgAiBQJTmyS2AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgAAKCRAWVaCraFdigHTmD/9OKhUyjJ+h8gMRg6ri5EQxOExccSRU0i7UHkte
cSs0DVC4lZG9AOzBe+Q36cym5Z1di6JQkHl69q3zBdV3KTW+H1pdmnZlebYGz8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TiL2tFLttLbfG5oQlxCfXX9/nasj3K9qnlEg9G3+4T7lpdP
mZRRe1O8cHCI5imVg6cLIiBLPO16e0fKyHIgYswLdrJFfaHNYM/SWJxHpX795zn+iCwyvZSl
LfH9mlegOeVmj9cyhN/VOmS3QRhlYXoA2z7WZTNoC6iAIlyIpMTcZr+ntaGVtFOLS6fwdBqD
XjmSQu66mDKwU5EkfNlbyrpzZMyFCDWEYo4AIR/18aGZBYUAEQEAAYkCHwQYAQIACQUCU5sk
tgIbDAAKCRAWVaCraFdigIPQEACcYh8rR19wMZZ/hgYv5so6Y1HcJNARuzmffQKozS/rxqec
0xM3wceL1AIMuGhlXFeGd0wRv/RVzeZjnTGwhN1DnCDy1I66hUTgehONsfVanuP1PZKoL38E
AxsMzdYgkYH6T9a4wJH/IPt+uuFTFFy3o8TKMvKaJk98+Jsp2X/QuNxhqpcIGaVbtQ1bn7m+
k5Qe/fz+bFuUeXPivafLLlGc6KbdgMvSW9EVMO7yBy/2JE15ZJgl7lXKLQ31VQPAHT3an5IV
2C/ie12eEqZWlnCiHV/wT+zhOkSpWdrheWfBT+achR4jDH80AS3F8jo3byQATJb3RoCYUCVc
3u1ouhNZa5yLgYZ/iZkpk5gKjxHPudFbDdWjbGflN9k17VCf4Z9yAb9QMqHzHwIGXrb7ryFc
uROMCLLVUp07PrTrRxnO9A/4xxECi0l/BzNxeU1gK88hEaNjIfviPR/h6Gq6KOcNKZ8rVFdw
FpjbvwHMQBWhrqfuG3KaePvbnObKHXpfIKoAM7X2qfO+IFnLGTPyhFTcrl6vZBTMZTfZiC1X
DQLuGUndsckuXINIU3DFWzZGr0QrqkuE/jyr7FXeUJj9B7cLo+s/TXo+RaVfi3kOc9BoxIvy
/qiNGs/TKy2/Ujqp/affmIMoMXSozKmga81JSwkADO1JMgUy6dApXz9kP4EE3g==
=CLGF
-----END PGP PUBLIC KEY BLOCK-----

2. change the file /tmp/.bench/playbooks/develop/includes/mariadb_ubuntu.yml

from

- name: Add apt key for node repo
    apt_key:
      url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
      id: "68576280"
      state: present
    become: yes
    become_user: root

to

- name: Add apt key for node repo
    apt_key:
      file: /tmp/nodesource.gpg.key
      state: present
    become: yes
    become_user: root

Thanks

2 Likes

no such file in this location /tmp/.bench/playbooks/develop/includes/

regards

@SOLOSOFT Hope your bench installed please check location to ‘/home/$USER/.bench’ .

@SOLOSOFT Seems like error is due to dependencies specially on Ubuntu 16.04. I think best way to resolve the issue would be:

Step 1: Remove frappe folder (from /home) , .bench (from /tmp), mysql & mariadb completely from server.

To remove any trace of mariadb installed through apt-get:
(Note: Backup your db if required)

sudo service mysql stop
sudo apt-get --purge remove "mysql*"
sudo rm -rf /etc/mysql/ 

and it is all gone. Including databases and any configuration file.

Step 2: Setup the system apt repo and install mariadb (10+ as required by ERPNext)

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirror.jmu.edu/pub/mariadb/repo/10.1/ubuntu xenial main'

sudo apt update -y
sudo apt install -y mariadb-server

Step 3: Secure your mariadb installation

sudo /usr/bin/mysql_secure_installation

During the interactive process, answer questions one by one as follows:

Enter current password for root (enter for none):
Set root password? [Y/n]: Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
Note: Be sure to replace with your own MariaDB root password.

Step 4: Install nodejs (Due to legecy nodejs dependencies on Ubuntu 16.04, ERPNext setup trigger a compilation error)

sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo apt-get update && sudo apt-get install nodejs-legacy

Install redis server and wkhtmltopdf by referring this link:

Redis server: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04

Wkhtmltopdf: sudo apt-get install wkhtmltopdf
(Note: this should install the latest version with QT)

Step 5: Follow manual installation as non-root user
(Note: This will install ERPNext which can be checked by http://ipadress:8000

git clone https://github.com/frappe/bench bench-repo
sudo pip install -e bench-repo
bench init frappe-bench && cd frappe-bench
bench new-site site1.local 
bench get-app erpnext https://github.com/frappe/erpnext
bench --site site1.local install-app erpnext

Step 6: Setup production

sudo bench setup production {{ username_goes_here }}

Thats it! Now you can use great ERPNext. :slight_smile: Spread the great work by ERPNext community.

2 Likes

@sunilsrikumar thank you so much
error at bench init cmd

INFO:bench.utils:git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --origin upstream
Cloning into ‘frappe’…
remote: Counting objects: 143760, done.
remote: Total 143760 (delta 0), reused 0 (delta 0), pack-reused 143760
Receiving objects: 100% (143760/143760), 118.61 MiB | 22.14 MiB/s, done.
Resolving deltas: 100% (109448/109448), done.
Checking connectivity… done.
(‘installing’, u’frappe’)
INFO:bench.app:installing frappe
INFO:bench.utils:frappe-bench/env/bin/pip install -q -e frappe-bench/apps/frappe --no-cache-dir
Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-kk8Wbm/mysqlclient/
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/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-repo/bench/commands/make.py”, line 21, in init
verbose=verbose, clone_from=clone_from, skip_bench_mkdir=skip_bench_mkdir, skip_redis_config_generation=skip_redis_config_generation)
File “/home/frappe/bench-repo/bench/utils.py”, line 64, in init
get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)
File “/home/frappe/bench-repo/bench/app.py”, line 76, in get_app
install_app(app=app_name, bench_path=bench_path, verbose=verbose)
File “/home/frappe/bench-repo/bench/app.py”, line 107, in install_app
find_links=find_links))
File “/home/frappe/bench-repo/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: frappe-bench/env/bin/pip install -q -e frappe-bench/apps/frappe --no-cache-dir

I believe you need to install pip
Apt-get install python-pip

I think the best way to install erpnext is to just use their setup.py as described on the website below
https://www.virtual-server.org/blog/how-to-install-erpnext-on-ubuntu-16-04/

@SOLOSOFT Traceback points to a typical python pip egg_info error. Please remove frappe folder (from /home) , .bench (from /tmp) once again and install dependencies for Ubuntu 16.04:

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install python-minimal
sudo apt-get install build-essential python-setuptools

Hopefully, this will complete the bench installation and rest of the steps illustrated in earlier post.

thank you @sunilsrikumar problem solved two things missing :
1 - sudo apt-get install libmariadbclient-dev
2 - add
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4

to /etc/mysql/my.cnf

regards

This does not work. Reported at Easy Install fails inside xc container (ubuntu16.04 guest) in proxmox5.1 fails