Try ERPNext Buy Support Partners Foundation

Error on ERPNext - Ubuntu 18.04 LTS Installation

It looks like this issue is still present.

Anyone solved it ?

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 190, 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=lcpharmacy']' returned non-zero exit status 2

Installing in a fresh Ubuntu Server 18.04 and still getting the same error.

Please can someone help in this ?

Can post the log preceding this error?

I am getting the same error on Ubuntu 16 and 18 systems.

@clarkej Thank you for your welcoming John .
I was very frustrated after spending 48 hrs trying to install v.12 without success…
On the up side, I have tried Odoo, and Dolibarr since. They installed both without an issue which was refreshing.
I did some more researching and it seems that installation issues have been around for ages and at this point in time can be considered as a feature. :wink:
Although for now I did find a way around by using a Bitnami image, not sure why no one has suggested it in the forums, because it took me about 6 minutes to download and deploy an OVA to my ESXi host(they offer images for every type of install). Not sure why ERPNext doesn’t offer a VMWare compatible template as an option to mediate this installation fiasco…
After pocking around for a few hours I can say already that I really like what I see and I just wish that installation process would be as clean as the ERPNext interface!
IMHO not having a working streamlined way of installing ERPNext is one of the main obstacles to success.

Cheers,

hgpilot

Facing same issue since yesterday. Have tried every combination possible with Ubuntu 16 & 18. Reinstalled about 5 times to get a clean server. Tried again today. No luck. Not really sure whats going on.

Here

    "cache_update_time": 1576664807,
    "cache_updated": false,
    "changed": false,
    "invocation": {
        "module_args": {
            "allow_unauthenticated": false,
            "autoclean": false,
            "autoremove": false,
            "cache_valid_time": 0,
            "deb": null,
            "default_release": null,
            "dpkg_options": "force-confdef,force-confold",
            "force": true,
            "force_apt_get": false,
            "install_recommends": null,
            "name": [
                "nodejs",
                "npm"
            ],
            "only_upgrade": false,
            "package": [
                "nodejs",
                "npm"
            ],
            "policy_rc_d": null,
            "purge": false,
            "state": "present",
            "update_cache": true,
            "upgrade": null
        }
    },
    "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"   --force-yes   install 'nodejs' 'npm'' failed: W: --force-yes is deprecated, use one of the options starting with --allow instead.\nE: Unable to correct problems, you have held broken packages.\n",
    "rc": 100,
    "stderr": "W: --force-yes is deprecated, use one of the options starting with --allow instead.\nE: Unable to correct problems, you have held broken packages.\n",
    "stderr_lines": [
        "W: --force-yes is deprecated, use one of the options starting with --allow instead.",
        "E: Unable to correct problems, you have held broken packages."
    ],
    "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 nodejs : Conflicts: npm\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:",
        " nodejs : Conflicts: npm"
    ]
}

RUNNING HANDLER [mariadb : restart mysql] **************************************
task path: /tmp/.bench/playbooks/roles/mariadb/handlers/main.yml:2

PLAY RECAP *********************************************************************
localhost                  : ok=28   changed=18   unreachable=0    failed=1    skipped=20   rescued=0    ignored=0

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 190, 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=alrazi']' returned non-zero exit status 2

I am not well versed but several weeks ago Rushabh noted this "The easy install script broke last week as the Ansible version was not pinned. " here Sporking Bench: New tools for installing ERPNext

So for example perhaps this recent change may have upset some “dependencies”?
https://github.com/frappe/bench/commit/ba4602bb2b53c0aa2f78195fac9e57d7ed805950#diff-f1887f8e3adfb11d2204ac25baab2d03

edit: Correction my link here refers to the past (Nov 4) misconfig pinned case…

Errors on ERPNext Installation (Solutions)

  • If node (npm error), install manually via apt-get and then remove it from /tmp/.bench/…/nodejs/tasks/main.yml installation step (refer to bench repository for the path)
  • If redis-server, modify /etc/redis/redis.conf to loopback as IPv4 (127.0.0.1, not 127.0.0.1 :: 1)
1 Like

Cause: 4 days ago, marcogabriel revised the playbooks for install.py to update easy-install playbooks for debian-10. (MariaDB version updated to 10.4)

After this update, Debian 10 installs. Unfortunately, lower versions including Ubuntu 18 fails.

The cause of the bug has been identified by roquegv, at the debian_family.yml line 10

roquegv has commented on this. The author marcogabriel has not yet made the corrections needed to fix the problem for debian (ubuntu) lower versions.

This might be helpful

A PR is under way:

Is there a work-around for this?

Can anyone point me toward a way to get this to work. I m not afraid to edit an installation file.

BKM

i did what muzzy suggested.
First i installed with the install.py script got the errors, then removed main.yml as mentioned by Muzzy.
Then i manually installed Nodejs.
After that i used the install.py file to install again. This time the install went through but there were still some complication so i did a “bench update” and it worked although i think i came across an npm yarn error and installed yarn manually as well but after that the “bench update” worked and my installs been running smoothly since yesterday.
Also you might have some issues doing the “bench update” if you are running a server with 1gb ram and 1gb swapfile like i am.

1 Like

Good scoop thanks! So Bitnami updates this to the current release, and kindly makes ova or vmdk images available to fetch https://bitnami.com/stack/erpnext/virtual-machine

I suspect the ‘official’ image here is manually maintained and so can be ages out of date https://erpnext.org/download

Where do I find main.yml

When I get the error, I do not yet have a frappe-bench directory for the user.

BKM

tmp/.bench/playbooks/roles/nodejs/tasks/main.yml

the first time you use install.py script it will store everything in tmp/.bench
you have to go to the directory i mentioned and remove the main.yml file

edit: you can also see the path of “tmp/.bench” when the install.py fails

1 Like

Thank you!!

1 Like

@warsmith

Welcome aboard !!!

You have been here only a short time and already you have added to the community.

Thank you immensely.

BKM :sunglasses:

i was big time lurking first VPS install i actually did was with your sudo -h technique so i jumped at the opportunity of helping you. i hope your install is up and running. They should sticky this topic.

It just completed successfully!!

Thank you again. I will post back here in a short while with the exact steps I used (including your work-around) to get to a successful system.

BKM

1 Like

i was planning to do that, but i trust you will do it better, as you have much more experience on here.

EDIT UPDATE
The browser that was using to create posts did not work well in the edit mode and it has created improper use of dashes in some of my posts. I have since re-edited this post with a different browser to fix this issue. I will not be using the conflicting browser in the future. Thank you to @jannis for pointing out the errors.

*EDIT Update *
This post has been updated to reflect additional steps needed after the successful completion of the install. These steps are important in order to get to the login page and start the system AFTER the install.

Ok, as promised, here are the steps I used to get the installation to complete on my Ubuntu 18.10 VPS host:

On a fresh Ubuntu host do the following:

  • Login as root and run the following commands:

apt-get update
apt-get upgrade

This will get the server up to the latest packages.

  • While still logged in as root, create the use r name account that you want to use for installing the ERPNext system (in my case it was “def_user”). then add then to the sudo group so they can execute commands without having to login as root user. Use these commands:

adduser [def_user]
usermod -aG sudo [def_user]

  • Then logout of the system and log back in as the new user

From there the following commands will get you a completed v12 install:

sudo -H apt-get install python3-minimal
sudo -H apt-get install python3-setuptools
sudo -H apt-get install build-essential
sudo -H apt-get install redis-server
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo -H python3 install.py --production --user [def_user]

At this point you will probably have encountered the error that ends with “exit status 2”

So do the following to complete the installation:

cd /tmp/.bench/playbooks/roles/nodejs/tasks
sudo mv main.yml main_yml.orig
cd ~
sudo apt-get install nodejs
sudo -H python3 install.py --production --user [def_user]

This time your installation should complete without errors.
However, you are not yet finished. The next steps will get your system ready to login for the first time:

sudo npm install -g yarn
cd frappe-bench
bench update

At this point you are probably still waiting for the bench update to complete. It takes a long time because it rebuilds just about everything in the process. Once the bench update is done, you can open a browser and login to the system as the Administrator and let the startup wizard finish setting up the database and configuring the system for you.

One additional note…

The Setup Wizard that runs during your first Administrator login, will sometimes take to long to complete and it may timeout. If that happens, do not be alarmed, just click on the “Retry” link in the timeout message and it should be able to finish it’s work and get you into the system to start your work.

Hope this helps someone else. I was stuck for a while today. This may only be necessary for a short while as we hope the original playbooks problems are fixed soon.

BKM

12 Likes