Fixing error “apt-get… return 100 expected 0” (Chef/Vagrant)

When running Chef for the first time on a VM, you may see an error like the following:

apt-get -q -y install couchdb=0.10.0-1ubuntu2 returned 100, expected 0

The problem is that your Vagrantfile script does not require Chef to do an “apt-get update” before running it’s scripts. This normally triggers updating the apt database, and something is referenced in the Chef script that is missing from the VM.

To fix this, download the cookbook called “apt” and run it prior to running the cookbooks you actually want.

Want to learn something new? I send out weekly, personalized emails with articles and conference talks. Click here to see an example and subscribe.

1 reply
  1. Willington Vega
    Willington Vega says:

    I spent a couple of hours looking for a solution before I saw your post. Thanks a lot.

    I run into the same problem installing Oracle’s JDK and PostgreSQL on Ubuntu Precise 12.04.

    The error was:

    apt-get -q -y install openjdk-6-jdk=6b24-1.11.4-1ubuntu0.12.04.1 returned 100, expected 0


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *