"Apt configuration problem. An attempt to configure apt to install additional packages from the CD failed" [closed]

I am trying to load v11.04 onto my HP desktop hard drive using a USB drive. I used the same USB drive to load the system on my Dell netbook and it loaded successfully. But trying to load on the desktop I get the error

Apt configuration problem. An attempt to configure apt to install additional packages from the CD failed

The installer then crashes. I have nothing in the CD drive. I can boot the system from the USB drive and it works fine. I have tried all options on the load with the same crash each time. I baffled as I successfully loaded my netbook with the same USB with no problems.


Firstly, I assume you are trying to install Natty on your HP desktop from a USB.

So, I looked up the error and reached Ubiquity bug 768239 where comment 11 is might be useful.

Bug 768239 is
11.04 Installer crashed, apt configuration problem:
InstallStepError: >AptSetup failed with code 127

Notes in that comment suggest bug 658865 is the cause for this...

When trying to install Ubuntu 10.10 from USB, ubiquity crashes with this message: "An attempt to configure apt to install additional packages from the CD failed."

Root of problem
The problem is that the file structure on the usb differs to what is on a livecd and apt-setup is unaware of this.

That bug goes on to discuss two alternatives.

  1. Remove the script that causes the error, when installing from a Live setup ("Try Ubuntu"):

    sudo rm /usr/lib/ubiquity/apt-setup/generators/40cdrom

  2. Create the files as they are expected
    To resolve this, simply copy the contents of filesystem.squashfs on the iso into the usb stick.

You'll get more context in the two bug records.