Unable to install frappe development setup , on ubuntu 14.04

Hi all ,

I am new to ubuntu and frappe , I installed ubuntu 14.04 and started installing frappe as described in GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps , first I ran
wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
sudo bash setup_frappe.sh . I omitted setup production and didnt install erpnext . setup succesfully installed and I got the passwords . Then I typed this command in the terminal
wget https://raw.githubusercontent.com/frappe/bench/develop/playbooks/install.py
python install.py --develop and got this error message :

TASK [install prequisites] *****************************************************
failed: [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’]) => {“cache_update_time”: 0, “cache_updated”: false, “failed”: true, “item”: [“build-essential”, “redis-server”, “nodejs”, “npm”, “software-properties-common”, “libxrender1”, “libxext6”, “xfonts-75dpi”, “xfonts-base”, “libjpeg8-dev”, “zlib1g-dev”, “libfreetype6-dev”, “liblcms2-dev”, “libwebp-dev”, “python-tk”], “msg”: “‘/usr/bin/apt-get -y -o "Dpkg::Options::=–force-confdef" -o "Dpkg::Options::=–force-confold" install ‘npm’’ 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 npm : Depends: nodejs but it is not going to be installed\n Depends: node-abbrev (>= 1.0.4) but it is not going to be installed\n Depends: node-ansi but it is not going to be installed\n Depends: node-archy but it is not going to be installed\n Depends: node-block-stream but it is not going to be installed\n Depends: node-fstream (>= 0.1.22) but it is not going to be installed\n Depends: node-fstream-ignore but it is not going to be installed\n Depends: node-github-url-from-git but it is not going to be installed\n Depends: node-glob (>= 3.1.21) but it is not going to be installed\n Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed\n Depends: node-inherits but it is not going to be installed\n Depends: node-ini (>= 1.1.0) but it is not going to be installed\n Depends: node-lockfile but it is not going to be installed\n Depends: node-lru-cache (>= 2.3.0) but it is not going to be installed\n Depends: node-minimatch (>= 0.2.11) but it is not going to be installed\n Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed\n Depends: node-gyp (>= 0.10.9) but it is not going to be installed\n Depends: node-nopt (>= 2.1.1) but it is not going to be installed\n Depends: node-npmlog but it is not going to be installed\n Depends: node-once but it is not going to be installed\n Depends: node-osenv but it is not going to be installed\n Depends: node-read but it is not going to be installed\n Depends: node-read-package-json (>= 1.1.0) but it is not going to be installed\n Depends: node-request (>= 2.25.0) but it is not going to be installed\n Depends: node-retry but it is not going to be installed\n Depends: node-rimraf (>= 2.2.2) but it is not going to be installed\n Depends: node-semver (>= 2.1.0) but it is not going to be installed\n Depends: node-sha but it is not going to be installed\n Depends: node-slide but it is not going to be installed\n Depends: node-tar (>= 0.1.18) but it is not going to be installed\n Depends: node-which 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:”, " npm : Depends: nodejs but it is not going to be installed", " Depends: node-abbrev (>= 1.0.4) but it is not going to be installed", " Depends: node-ansi but it is not going to be installed", " Depends: node-archy but it is not going to be installed", " Depends: node-block-stream but it is not going to be installed", " Depends: node-fstream (>= 0.1.22) but it is not going to be installed", " Depends: node-fstream-ignore but it is not going to be installed", " Depends: node-github-url-from-git but it is not going to be installed", " Depends: node-glob (>= 3.1.21) but it is not going to be installed", " Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed", " Depends: node-inherits but it is not going to be installed", " Depends: node-ini (>= 1.1.0) but it is not going to be installed", " Depends: node-lockfile but it is not going to be installed", " Depends: node-lru-cache (>= 2.3.0) but it is not going to be installed", " Depends: node-minimatch (>= 0.2.11) but it is not going to be installed", " Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed", " Depends: node-gyp (>= 0.10.9) but it is not going to be installed", " Depends: node-nopt (>= 2.1.1) but it is not going to be installed", " Depends: node-npmlog but it is not going to be installed", " Depends: node-once but it is not going to be installed", " Depends: node-osenv but it is not going to be installed", " Depends: node-read but it is not going to be installed", " Depends: node-read-package-json (>= 1.1.0) but it is not going to be installed", " Depends: node-request (>= 2.25.0) but it is not going to be installed", " Depends: node-retry but it is not going to be installed", " Depends: node-rimraf (>= 2.2.2) but it is not going to be installed", " Depends: node-semver (>= 2.1.0) but it is not going to be installed", " Depends: node-sha but it is not going to be installed", " Depends: node-slide but it is not going to be installed", " Depends: node-tar (>= 0.1.18) but it is not going to be installed", " Depends: node-which but it is not going to be installed"]}

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

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

Traceback (most recent call last):
File “install.py”, line 153, in
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

Please help

You should only select one of the two install options available.
If you want the current version just use the first option.
wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
sudo bash setup_frappe.sh

If you want cutting edge Dev version:
Spin up a new VM instance with a fresh install of Ubuntu 14.04
then run
sudo apt-get update && sudo apt-get upgrade
Then run
python --version
This should return something like “Python 2.7.6”
Create a new user called frappe that can sudo
open new terminal window and log into VM as user frappe with the password you chose.
Then run the second install option:
wget https://raw.githubusercontent.com/frappe/bench/develop/playbooks/install.py
python install.py --develop

HTH

1 Like

Got it . Thank you so much for your swift response . I have one more doubt , I want to install erpnext and develop an app ( customise ) erpnext as well . So should I follow easy production setup or development setup ?

I would use the easy install method omitting the --setup-production at the end of the sudo bash setup_frappe.sh command.
As above I would do this on a fresh VM instance of Ubuntu 14.04 and run
sudo apt-get update && sudo apt-get upgrade before trying the install.
After the install is complete open new terminal window and log into VM as user frappe with the password you chose and change directory into /frappe-bench/
and run bench start and all other bench commands.

1 Like

will I be able to customise erpnext if I follow this procedure ?

Yes
Is this is for a local development environment?
What OS is your local computer running?

No , I am planning to develop app and host it from ubuntu computer and other systems (running under windows OS) will access the app with ubuntu computer’s IP address .

any difference between the dev vs the production version?

even i have this doubt ?

@ericmachine88 @ragav

The Production setup uses Nginx and Supervisor, this setup isn’t meant for instant updates in code. Background services handle all the work, and they start with the system. Supervisor makes sure everything keeps running. It installs with the master branch of ERPNext and FrappĂ©.

The developer setup uses socketio. You need to explicitly start your server by running bench start. Any change in code, you’ll see reflected. This installs with the develop branch of ERPNext and FrappĂ©.

I would suggest using the development setup for developing, and when you want to host it, you should use a production setup. You can grab our VM (it’s a production VM) and set it up on your systems and install your custom app on it.

2 Likes

Thanks a lot for the information . It was really useful .

1 Like