Try ERPNext Buy Support Partners Foundation

Getting error when installing on a fresh Ubuntu 18 using easy install for production. Any fix?

TASK [nodejs : Install nodejs 8] ***********************************************
task path: /tmp/.bench/playbooks/roles/nodejs/tasks/debian_family.yml:8
<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/ansible-tmp-1576721278.3724773-158195746832189 `" && echo ansible-tmp-1576721278.3724773-158195746832189="` echo /root/.ansible/tmp/ansible-tmp-1576721278.3724773-158195746832189 `" ) && sleep 0'
Using module file /usr/local/lib/python3.6/dist-packages/ansible/modules/packaging/os/apt.py
<127.0.0.1> PUT /home/skserpnext/.ansible/tmp/ansible-local-27307hm9n3dtc/tmp5ng0f435 TO /root/.ansible/tmp/ansible-tmp-1576721278.3724773-158195746832189/AnsiballZ_apt.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1576721278.3724773-158195746832189/ /root/.ansible/tmp/ansible-tmp-1576721278.3724773-158195746832189/AnsiballZ_apt.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1576721278.3724773-158195746832189/AnsiballZ_apt.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1576721278.3724773-158195746832189/ > /dev/null 2>&1 && sleep 0'   
fatal: [localhost]: FAILED! => {
        "cache_update_time": 1576721280,
        "cache_updated": true,
        "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=27   changed=7    unreachable=0    failed=1    skipped=21   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=frappe']' returned non-zero exit status 2

Already tried with --user and without on install script. Same error.

Easy install was updated 4 days ago to install in debian 10. So, Easy install works in this version.

But this update causes this error for lower versions. The error has been identified and commented on in GitHub. The author of the update has not yet made the necessary corrections.

This issue is discussed in this topic.

1 Like

Ok, but is there a work-around I can use now to get the Easy Install method to work on Ubuntu v18?

The github links in your linked thread do not indicate anything that can see as a workaround (but that may be that I am not sure what I am looking at in the code).

BKM

BKM

Use Debian 10 instead of Ubuntu v18 until this gets fixed.

As much as that sounds good, it is not an option on most hosting services. Currently all of the hosting services that I use only provide up to Debian v9, Ubuntu v18.1, Centos 7.

That is why I was looking for a work-around. I do not have the option go to Debian 10 unless I go hunt down some alternate VPS provider. That process takes a great deal of time to evaluate a new provider.

So, I am still looking for a work-around.

BKM

Sorry. I am using google cloud compute machines which has debian 10 minimal server image. Thanks for the tip.

That would be expected. GCP is primarily a development platform and has all of the latest images as they are updated each week. They do this so developers can have easy access to the most up-to-date operating systems.

BKM