You are not logged in.
Hi,
I am trying to install fheroes2 (from the repo of course), and it requires an additional download/compilation of some non-free components. According to the instructions, after Synaptic is done and closed, I issued:
~$ sudo dpkg-reconfigure fheroes2-pkg
Pseudo-grapic menu appeared asking for permission to download and to compile, "Yes", but then:
fheroes2-pkg: dpkg database is locked. You may need to use command "sudo dpkg-reconfigure fheroes2-pkg".
fheroes2-pkg: Building and installation of package(s) [fheroes2] postponed till after next APT operation.
Synaptic is not running, no traces of apt/dpkg/synaptic in the processes list. Tried to reboot - no changes, still got stuck.
It looks like I can manually delete a lock file, do my stuff and then probably reboot to restore a status-quo, but is it safe? Maybe any other more conventional methods to deal with this?
ASCII 64bit.
Thank you.
Offline
Check if anything's using the lock:
lsof /var/lib/dpkg/lock
If not then it should be safe to remove manually.
Brianna Ghey — Rest In Power
Offline
Check if anything's using the lock:
lsof /var/lib/dpkg/lock
If not then it should be safe to remove manually.
Huh, it doesn't seem to work.
lsof /var/lib/dpkg/lock does not report anything, but:
~$ sudo rm /var/lib/dpkg/lock
~$ sudo dpkg-reconfigure fheroes2-pkg
fheroes2-pkg: dpkg database is locked. You may need to use command "sudo dpkg-reconfigure fheroes2-pkg".
fheroes2-pkg: Building and installation of package(s) [fheroes2] postponed till after next APT operation.
Last edited by Copper36 (2020-11-08 16:56:58)
Offline
There are other lock files:
find /var -name 'lock*' -exec lsof {} \;
EDIT: added -exec option.
Last edited by Head_on_a_Stick (2020-11-08 17:10:38)
Brianna Ghey — Rest In Power
Offline
Here is the output:
~$ find /var -name 'lock*' -exec lsof {} \;
find: ‘/var/log/exim4’: Permission denied
find: ‘/var/lib/sudo/ts’: Permission denied
find: ‘/var/lib/colord/.cache’: Permission denied
find: ‘/var/lib/udisks2’: Permission denied
find: ‘/var/lib/polkit-1’: Permission denied
find: ‘/var/lib/geoclue/.cache’: Permission denied
find: ‘/var/lib/apt/lists/partial’: Permission denied
find: ‘/var/lib/rkhunter/db’: Permission denied
find: ‘/var/lib/rkhunter/tmp’: Permission denied
find: ‘/var/cache/ldconfig’: Permission denied
find: ‘/var/cache/cups’: Permission denied
find: ‘/var/cache/apt/archives/partial’: Permission denied
find: ‘/var/spool/cups’: Permission denied
find: ‘/var/spool/cron/crontabs’: Permission denied
find: ‘/var/spool/exim4’: Permission denied
find: ‘/var/spool/rsyslog’: Permission denied
Should it be run with sudo?
I also looked at what happens to the /var/lib/dpkg/lock, it keeps re-appearing at the moment I hit "Yes" in the download-compile window... not sure if it should.
Last edited by Copper36 (2020-11-08 18:46:00)
Offline
Okay, I've tried installing that in my Debian buster box and I see the same errors but I don't know why. If nobody else can help with this then it may be best to open a bug report.
Brianna Ghey — Rest In Power
Offline
Looks like an install script bug at /usr/lib/fheroes2-pkg/b-i_fheroes2.sh:20
Change that line to be
echo # dpkg -i /dev/zero 2>/dev/null
to make it build more happily.
Offline
Okay, I've tried installing that in my Debian buster box and I see the same errors but I don't know why. If nobody else can help with this then it may be best to open a bug report.
My wild guess would be the script locks dpkg for itself... Anyway, I compiled it from the sources, seems to work.
Thank you for your time and effort!
P.S. I have found a reference to the same error (but one and only) on one of the Debian forums dated 2017.
Offline