distribution upgrade from 16.04 to 16.10 aborts with error message 'Failed to lock /var/cache/apt/archives/lock'

Bug #1637317 reported by mervyn thomas
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
New
Undecided
Unassigned
ubuntu-release-upgrader (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

here is the result of do-release-upgrade
mervyn@Yoga3:~$ sudo do-release-upgrade
[sudo] password for mervyn:
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1,261 kB]
Fetched 1,261 kB in 0s (0 B/s)
authenticate 'yakkety.tar.gz' against 'yakkety.tar.gz.gpg'
extracting 'yakkety.tar.gz'

Reading cache

Checking package manager

Unable to get exclusive lock

This usually means that another package management application (like
apt-get or aptitude) already running. Please close that application
first.

mervyn@Yoga3:~$

Re ran after trying :

mervyn@Yoga3:~$ ps -e | grep -e apt -e synaptic -e gnome-software -e unattended-upgrades
 1822 tty2 00:00:07 gnome-software
 7148 ? 00:00:02 aptd

sudo kill 7148
sudo kill 1822
sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1,261 kB]
Fetched 1,261 kB in 0s (0 B/s)
authenticate 'yakkety.tar.gz' against 'yakkety.tar.gz.gpg'
extracting 'yakkety.tar.gz'

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://au.archive.ubuntu.com/ubuntu xenial InRelease
Hit http://au.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit http://au.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit https://cloud.r-project.org/bin/linux/ubuntu xenial/ InRelease
Hit http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit http://archive.canonical.com/ubuntu xenial InRelease
Fetched 0 B in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Updating repository information

Third party sources disabled

Some third party entries in your sources.list were disabled. You can
re-enable them after the upgrade with the 'software-properties' tool
or your package manager.

To continue please press [ENTER]

Get:1 http://au.archive.ubuntu.com/ubuntu yakkety InRelease [247 kB]
Get:2 http://au.archive.ubuntu.com/ubuntu yakkety-updates InRelease [94.5 kB]
Get:3 http://au.archive.ubuntu.com/ubuntu yakkety-backports InRelease [92.2 kB]
Get:4 http://security.ubuntu.com/ubuntu yakkety-security InRelease [92.2 kB]
Get:5 http://au.archive.ubuntu.com/ubuntu yakkety/multiverse Sources [181 kB]
Get:6 http://au.archive.ubuntu.com/ubuntu yakkety/main Sources [903 kB]
Get:7 http://archive.canonical.com/ubuntu yakkety InRelease [11.5 kB]
Get:8 http://au.archive.ubuntu.com/ubuntu yakkety/universe Sources [8,044 kB]
Get:9 http://archive.canonical.com/ubuntu yakkety/partner Sources [2,252 B]
Get:10 http://archive.canonical.com/ubuntu yakkety/partner amd64 Packages [2,552 B]
Get:11 http://archive.canonical.com/ubuntu yakkety/partner i386 Packages [2,860 B]
Get:12 http://archive.canonical.com/ubuntu yakkety/partner Translation-en [1,352 B]
Get:13 http://security.ubuntu.com/ubuntu yakkety-security/multiverse Sources [732 B]
Get:14 http://security.ubuntu.com/ubuntu yakkety-security/main Sources [5,232 B]
Get:15 http://security.ubuntu.com/ubuntu yakkety-security/universe Sources [3,404 B]
Get:16 http://security.ubuntu.com/ubuntu yakkety-security/main amd64 Packages [10.9 kB]
Get:17 http://security.ubuntu.com/ubuntu yakkety-security/main i386 Packages [10.1 kB]
Get:18 http://security.ubuntu.com/ubuntu yakkety-security/main Translation-en [7,448 B]
Get:19 http://security.ubuntu.com/ubuntu yakkety-security/main amd64 DEP-11 Metadata [196 B]
Get:20 http://security.ubuntu.com/ubuntu yakkety-security/restricted amd64 DEP-11 Metadata [186 B]
Get:21 http://security.ubuntu.com/ubuntu yakkety-security/universe amd64 Packages [4,440 B]
Get:22 http://security.ubuntu.com/ubuntu yakkety-security/universe i386 Packages [4,448 B]
Get:23 http://security.ubuntu.com/ubuntu yakkety-security/universe Translation-en [5,016 B]
Get:24 http://security.ubuntu.com/ubuntu yakkety-security/universe amd64 DEP-11 Metadata [200 B]
Get:25 http://security.ubuntu.com/ubuntu yakkety-security/multiverse amd64 Packages [1,172 B]
Get:26 http://security.ubuntu.com/ubuntu yakkety-security/multiverse i386 Packages [1,336 B]
Get:27 http://security.ubuntu.com/ubuntu yakkety-security/multiverse Translation-en [628 B]
Get:28 http://security.ubuntu.com/ubuntu yakkety-security/multiverse amd64 DEP-11 Metadata [201 B]
Get:29 http://au.archive.ubuntu.com/ubuntu yakkety/restricted Sources [5,376 B]
Get:30 http://au.archive.ubuntu.com/ubuntu yakkety/main amd64 Packages [1,222 kB]
Get:31 http://au.archive.ubuntu.com/ubuntu yakkety/main i386 Packages [1,218 kB]
Get:32 http://au.archive.ubuntu.com/ubuntu yakkety/main Translation-en [582 kB]
Get:33 http://au.archive.ubuntu.com/ubuntu yakkety/main Translation-en_AU [420 kB]
Get:34 http://au.archive.ubuntu.com/ubuntu yakkety/main amd64 DEP-11 Metadata [654 kB]
Get:35 http://au.archive.ubuntu.com/ubuntu yakkety/main DEP-11 64x64 Icons [368 kB]
Get:36 http://au.archive.ubuntu.com/ubuntu yakkety/restricted amd64 Packages [8,416 B]
Get:37 http://au.archive.ubuntu.com/ubuntu yakkety/restricted i386 Packages [8,724 B]
Get:38 http://au.archive.ubuntu.com/ubuntu yakkety/restricted Translation-en [2,996 B]
Get:39 http://au.archive.ubuntu.com/ubuntu yakkety/restricted Translation-en_AU [2,012 B]
Get:40 http://au.archive.ubuntu.com/ubuntu yakkety/restricted amd64 DEP-11 Metadata [187 B]
Get:41 http://au.archive.ubuntu.com/ubuntu yakkety/universe amd64 Packages [7,729 kB]
Get:42 http://au.archive.ubuntu.com/ubuntu yakkety/universe i386 Packages [7,712 kB]
Get:43 http://au.archive.ubuntu.com/ubuntu yakkety/universe Translation-en [4,484 kB]
Get:44 http://au.archive.ubuntu.com/ubuntu yakkety/universe Translation-en_AU [3,039 kB]
Get:45 http://au.archive.ubuntu.com/ubuntu yakkety/universe amd64 DEP-11 Metadata [2,669 kB]
Get:46 http://au.archive.ubuntu.com/ubuntu yakkety/universe DEP-11 64x64 Icons [7,194 kB]
Get:47 http://au.archive.ubuntu.com/ubuntu yakkety/multiverse amd64 Packages [146 kB]
Get:48 http://au.archive.ubuntu.com/ubuntu yakkety/multiverse i386 Packages [141 kB]
Get:49 http://au.archive.ubuntu.com/ubuntu yakkety/multiverse Translation-en [108 kB]
Get:50 http://au.archive.ubuntu.com/ubuntu yakkety/multiverse Translation-en_AU [67.7 kB]
Get:51 http://au.archive.ubuntu.com/ubuntu yakkety/multiverse amd64 DEP-11 Metadata [47.6 kB]
Get:52 http://au.archive.ubuntu.com/ubuntu yakkety/multiverse DEP-11 64x64 Icons [246 kB]
Get:53 http://au.archive.ubuntu.com/ubuntu yakkety-updates/multiverse Sources [732 B]
Get:54 http://au.archive.ubuntu.com/ubuntu yakkety-updates/main Sources [13.7 kB]
Get:55 http://au.archive.ubuntu.com/ubuntu yakkety-updates/universe Sources [8,148 B]
Get:56 http://au.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 Packages [30.6 kB]
Get:57 http://au.archive.ubuntu.com/ubuntu yakkety-updates/main i386 Packages [29.8 kB]
Get:58 http://au.archive.ubuntu.com/ubuntu yakkety-updates/main Translation-en [16.3 kB]
Get:59 http://au.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 DEP-11 Metadata [53.2 kB]
Get:60 http://au.archive.ubuntu.com/ubuntu yakkety-updates/main DEP-11 64x64 Icons [28.6 kB]
Get:61 http://au.archive.ubuntu.com/ubuntu yakkety-updates/restricted amd64 DEP-11 Metadata [185 B]
Get:62 http://au.archive.ubuntu.com/ubuntu yakkety-updates/universe amd64 Packages [22.6 kB]
Get:63 http://au.archive.ubuntu.com/ubuntu yakkety-updates/universe i386 Packages [22.6 kB]
Get:64 http://au.archive.ubuntu.com/ubuntu yakkety-updates/universe Translation-en [13.7 kB]
Get:65 http://au.archive.ubuntu.com/ubuntu yakkety-updates/universe amd64 DEP-11 Metadata [60.2 kB]
Get:66 http://au.archive.ubuntu.com/ubuntu yakkety-updates/universe DEP-11 64x64 Icons [47.4 kB]
Get:67 http://au.archive.ubuntu.com/ubuntu yakkety-updates/multiverse amd64 Packages [1,172 B]
Get:68 http://au.archive.ubuntu.com/ubuntu yakkety-updates/multiverse i386 Packages [1,336 B]
Get:69 http://au.archive.ubuntu.com/ubuntu yakkety-updates/multiverse Translation-en [628 B]
Get:70 http://au.archive.ubuntu.com/ubuntu yakkety-updates/multiverse amd64 DEP-11 Metadata [185 B]
Get:71 http://au.archive.ubuntu.com/ubuntu yakkety-backports/main amd64 DEP-11 Metadata [182 B]
Get:72 http://au.archive.ubuntu.com/ubuntu yakkety-backports/restricted amd64 DEP-11 Metadata [187 B]
Get:73 http://au.archive.ubuntu.com/ubuntu yakkety-backports/universe amd64 DEP-11 Metadata [186 B]
Get:74 http://au.archive.ubuntu.com/ubuntu yakkety-backports/multiverse amd64 DEP-11 Metadata [187 B]
Fetched 48.2 MB in 6s (2,417 kB/s)

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done

Calculating the changes

Calculating the changes

Do you want to start the upgrade?

2 installed packages are no longer supported by Canonical. You can
still get support from the community.

17 packages are going to be removed. 192 new packages are going to be
installed. 1884 packages are going to be upgraded.

Installing the upgrade can take several hours. Once the download has
finished, the process cannot be cancelled.

 Continue [yN] Details [d]y

Fetching
Fetched 0 B in 0s (0 B/s)

Upgrading

Could not download the upgrades

The upgrade has aborted. Please check your Internet connection or
installation media and try again.

Failed to lock /var/cache/apt/archives/lock

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-__pnlkna/yakkety", line 8, in <module>
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/DistUpgradeMain.py", line 242, in main
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/DistUpgradeController.py", line 1880, in run
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/DistUpgradeController.py", line 1845, in fullUpgrade
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/DistUpgradeController.py", line 1263, in doDistUpgrade
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/DistUpgradeController.py", line 1385, in abort
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/sourceslist.py", line 366, in restore_backup
  File "/usr/lib/python3.5/shutil.py", line 236, in copy
    copymode(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.5/shutil.py", line 138, in copymode
    chmod_func(dst, stat.S_IMODE(st.st_mode))
PermissionError: [Errno 1] Operation not permitted: '/etc/apt/sources.list'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 109, in apport_excepthook
    pr.add_proc_info(extraenv=['PYTHONPATH', 'PYTHONHOME'])
  File "/usr/lib/python3/dist-packages/apport/report.py", line 544, in add_proc_info
    self['ExecutableTimestamp'] = str(int(os.stat(self['ExecutablePath']).st_mtime))
PermissionError: [Errno 13] Permission denied: '/tmp/ubuntu-release-upgrader-__pnlkna/yakkety'

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-__pnlkna/yakkety", line 8, in <module>
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/DistUpgradeMain.py", line 242, in main
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/DistUpgradeController.py", line 1880, in run
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/DistUpgradeController.py", line 1845, in fullUpgrade
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/DistUpgradeController.py", line 1263, in doDistUpgrade
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/DistUpgradeController.py", line 1385, in abort
  File "/tmp/ubuntu-release-upgrader-__pnlkna/DistUpgrade/sourceslist.py", line 366, in restore_backup
  File "/usr/lib/python3.5/shutil.py", line 236, in copy
    copymode(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.5/shutil.py", line 138, in copymode
    chmod_func(dst, stat.S_IMODE(st.st_mode))
PermissionError: [Errno 1] Operation not permitted: '/etc/apt/sources.list'
mervyn@Yoga3:~$

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Revision history for this message
Timothy S. Rooney (timothysrooney) wrote :

This affects me as well. Perhaps it has to do with 32-bit OS?

Processor: AMD Phenom(tm) II X4 955 Processor × 4
OS: 32-bit

Revision history for this message
Timothy S. Rooney (timothysrooney) wrote :

I was able to get around this "bug." All I had to do was run the Software Updater. This upgraded my kernel to the next version of the kernel. When I ran the Updater once again to upgrade to 16.10, it worked.

Therefore, with 16.04, run all updates available. Then, when all updates are installed, run the upgrade to 16.10.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.