Ubuntu 13.10 64 server, after doing one upgrade from 13.04 -> 13.10 then attempting 13.10 -> 14.04. I had a transient network failure downloading package lists for 14.04 once which stopped the process, trying to restart the process results in the following

root@server:~# do-release-upgrade -d

Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1,148 kB]
Fetched 1,148 kB in 0s (0 B/s)
authenticate 'trusty.tar.gz' against 'trusty.tar.gz.gpg'
gpg exited 2
Debug information:

gpg: fatal: can't open fd 6 for status output: Bad file descriptor
secmem usage: 0/0 bytes in 0/0 blocks of pool 0/0

Authentication failed
Authenticating the upgrade failed. There may be a problem with the network or with the server.

How can I restart the do-release-upgrade process?

Apt-get has been fully updated, upgraded, dist-upgraded.


root@server:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 13.10
Release:        13.10
Codename:       saucy

This answer is almost off-topic, but something what I've been wondering.

Every time I upgrade Debian or some of its derivates, such as Ubuntu or Mint, I just do

sed -i -e 's/olddistroname/newdistroname/g' /etc/apt/sources.list
apt-get update && apt-get dist-upgrade

And then I enjoy my new, just released distro.

This has worked for me since forever. All this do-release-upgrade hoopla makes me a very confused, angry, old-beard.

So my sub-question is: what is the benefit of those do-release-upgrade style commands if they don't even work? What's wrong with the proven, working way? (apt-get versus aptitude is another fight I'm just trying to digest)

| improve this answer | |
  • 1
    Agreed it is off-topic, however it has resolved the problem. System is now upgraded. I don't know why I didn't think of this myself! Thank you! – Drew Anderson Apr 30 '14 at 11:13

In my case, the same error was caused (as suggested in the error output) by the repositories for my release (13.04) being unavailable. This in turn was due to 13.04 just not being supported any longer. (You easily notice this by the failure of apt-get update.) It seems like in such a case you can not do-release-upgrade but actually have to add some repositories which provide the new packages (e.g. just replace old by new release name in /etc/apt/sources.list) and then apt-get update && apt-get dist-upgrade as suggested by Janne. (This way also the package signatures are verified, of course.)

| improve this answer | |

First do sudo dpkg --configure -a to clean up anything you broke, followed by sudo apt-get update to update your sources, then try again. Keep in mind sudo do-release-upgrade -d should be used with caution and certainly should not be used in production environments.


According to upgrade documentation you can directly upgrade to Ubuntu 14.04 ("Trusty Tahr") from Ubuntu 13.10 ("Saucy Salamander") without the -d option. You should be able to solve this by executing sudo do-release-upgrade

| improve this answer | |
  • Tried exactly as suggested. This has not fixed the "gpg: fatal: can't open fd 6 for status output: Bad file descriptor" error. Output of do-release-upgrade remains exactly as described above. – Drew Anderson Apr 29 '14 at 14:08
  • Make sure your system is current with sudo apt-get dist-upgrade first. – nullmem Apr 29 '14 at 14:13
  • Unfortunately this is all up to date: apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. – Drew Anderson Apr 29 '14 at 14:17
  • could you please include a copy of your sudo lsb_release -a for me. – nullmem Apr 29 '14 at 14:34
  • Updated as requested. – Drew Anderson Apr 29 '14 at 14:40

Run these commands in the terminal:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32

This downloads the missing GPG keys (as mentioned in the original error message) from the Ubuntu GPG keyserver.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.