gantsign / ansible-role-java

Ansible role for installing Java from Adoptium

Home Page:https://galaxy.ansible.com/gantsign/java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Install unarchive module dependencies" fails with dpkg lock

magichome opened this issue · comments

The '/var/lib/dpkg/lock-frontend' file is present but there are no active apt processes. Before calling ansible-role-java I do a delete of the lock file just in case anything I did caused the problem. This is on Ubuntu 16.

TASK [ansible-role-java : install unarchive module dependencies (apt, yum, dnf, zypper)] *************************************************************************************************************************************
[WARNING]: Updating cache and auto-installing missing dependency: python-apt
fatal: [52.205.3.189]: FAILED! => {"changed": false, "cmd": "apt-get install --no-install-recommends python-apt -y -q", "msg": "E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)\nE: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?", "rc": 100, "stderr": "E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)\nE: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?\n", "stderr_lines": ["E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)", "E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?"], "stdout": "", "stdout_lines": []}

Follow-up: I removed that task and it worked fine.

This appears to be an issue with installing APT packages rather than something specific to this role. This role installs tar, gzip and unzip packages to extract the JDK archive. Ansible needs to install python-apt to be able to install packages on Ubuntu.

You may try running sudo apt-get install --no-install-recommends python-apt from the command line and see if you still encounter the same issue. This article covers the issue https://itsfoss.com/could-not-get-lock-error/ (you need to scroll down to the section that mentions /var/lib/dpkg/lock-frontend). If that doesn't help I suggest posting on the Ubuntu forums for assistance. Best of luck.