I often try to install packages and I cannot since unattended-upgrades
has locked files.
Very often, it runs for more than 6 hours.
Is that normal?
Given I have
$ cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
$ cat /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
I guess that is unexpected.
PS: I have now changed configuration as per this. Hopefully it will alleviate the issue.
EDIT #1: This may indicate that it is actually waiting (due to network issues. most likely due to proxy blocking) and retrying, while keeping the lock. I guess keeping the lock while just waiting is very unfortunate.
$ cat /var/log/unattended-upgrades/unattended-upgrades.log | grep "2020-04-13"
2020-04-13 06:10:49,892 INFO Initial blacklisted packages:
2020-04-13 06:10:49,894 INFO Initial whitelisted packages:
2020-04-13 06:10:49,894 INFO Starting unattended upgrades script
2020-04-13 06:10:49,895 INFO Allowed origins are: o=Ubuntu,a=bionic, o=Ubuntu,a=bionic-security, o=UbuntuESM,a=bionic
2020-04-13 06:25:16,404 WARNING package libpython2.7 upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
2020-04-13 06:25:21,128 WARNING package libpython2.7 upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
2020-04-13 06:46:57,101 WARNING package libpython2.7-dev upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
2020-04-13 06:47:02,113 WARNING package libpython2.7-dev upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
2020-04-13 08:29:08,908 ERROR An error occurred: 403 URLBlockDownload [IP: XXXXXXXX]
2020-04-13 08:29:08,909 ERROR The URI http://security.ubuntu.com/ubuntu/pool/main/d/db5.3/libdb5.3-java_5.3.28-13.1ubuntu1.1_all.deb failed to download, aborting
2020-04-13 08:29:24,965 INFO Initial blacklisted packages:
2020-04-13 08:29:24,966 INFO Initial whitelisted packages:
2020-04-13 08:29:24,966 INFO Starting unattended upgrades script
2020-04-13 08:29:24,967 INFO Allowed origins are: o=Ubuntu,a=bionic, o=Ubuntu,a=bionic-security, o=UbuntuESM,a=bionic
2020-04-13 08:43:57,555 WARNING package libpython2.7 upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
2020-04-13 08:44:02,297 WARNING package libpython2.7 upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
2020-04-13 09:05:46,548 WARNING package libpython2.7-dev upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
2020-04-13 09:05:51,561 WARNING package libpython2.7-dev upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
As for the other issue/s, I did not find yet the cause, but
I have updated libpython2.7
and libpython2.7-dev
to see if this removes some of the retrying and delays.
$ sudo apt-get install libpython2.7
...
The following additional packages will be installed:
libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib python2.7 python2.7-dev python2.7-minimal
Suggested packages:
python2.7-doc
The following packages will be upgraded:
libpython2.7 libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib python2.7 python2.7-dev python2.7-minimal
...
On a quick test, I could not get network speed, but it is usually not an issue
$ speedtest-cli --no-upload
Retrieving speedtest.net configuration...
Cannot retrieve speedtest configuration
ERROR: <urlopen error [Errno -2] Name or service not known>
Related: Limiting the time Unattended-Upgrade keeps the lock on `/var/lib/dpkg/`
speedtest-cli --no-upload
command from the terminal?