Code: Select all
#!/bin/bash
# Update the package manager
sudo dpkg --configure -a
sudo apt-get update
# Uninstall the apt-listchanges package to allow silent install of ca certificates
sudo apt-get -y remove apt-listchanges
# Update the distribution
sudo apt-get -y dist-upgrade
# Another 200 lines of install follow
Code: Select all
Preparing to unpack .../libapt-inst2.0_1.4.9_armhf.deb ...
Unpacking libapt-inst2.0:armhf (1.4.9) over (1.4.8) ...
Preparing to unpack .../archives/apt_1.4.9_armhf.deb ...
Unpacking apt (1.4.9) over (1.4.8) ...
Setting up apt (1.4.9) ...
dpkg: error: dpkg status database is locked by another process
E: Sub-process /usr/bin/dpkg returned an error code (2)
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Code: Select all
Preparing to unpack .../libapt-inst2.0_1.4.9_armhf.deb ...
Unpacking libapt-inst2.0:armhf (1.4.9) over (1.4.8) ...
Preparing to unpack .../archives/apt_1.4.9_armhf.deb ...
Unpacking apt (1.4.9) over (1.4.8) ...
Setting up apt (1.4.9) ...
(Reading database ... 34568 files and directories currently installed.)
Looking for ideas. I have compared a failed install with a successful install and they both used the same mirror servers.
Thanks
Dave