I receive an error message when I try to upgrade from 16.04 to 16.10 and opened the traceback:
unattended_upgrade crashed with apt.cache.LockFailedException in_fetch_archives():
Failed to lock /var/cache/apt/archives/lock
I found it was linked to a python file called unattended_upgrade
. This was referencing a file called cache.py
and the traceback said it wasn't working in line 338, which I found to be this:
# get lock
lockfile = apt_pkg.config.find_dir("Dir::Cache::Archives") + "lock"
lock = apt_pkg.get_lock(lockfile)
if lock < 0:
raise LockFailedException("Failed to lock %s" % lockfile)
try:
# this may as well throw a SystemError exception
if not pm.get_archives(fetcher, self._list, self._records):
return False
# now run the fetcher, throw exception if something fails to be
# fetched
return self._run_fetcher(fetcher)
finally:
os.close(lock)
This code is in python 3 and I don't know what it does or how to fix it, but it won't let me upgrade. Thanks in advance