However, as mentioned above, debootstrap needs some coaxing. During
the second-stage run of debootstrap, I'm getting dpkg errors that
abort the bootstrap process. I can re-run debootstrap again and it
will complete, but I would really like to understand why second-stage
debootstrap can't complete the first time and fix the issues. Also,
looking in the debootstrap.log file I see a number of dependency
warnings, but I'm not sure if these are just normal warnings which are
a side effect of how debootsrap calls dpkg to install packages on a
clean filesystem.
The specific error I'm running into is the following:
dpkg: regarding .../apt_0.8.15.10_armhf.deb containing apt,
pre-dependency problem:
apt pre-depends on libstdc++6 (>= 4.6)
libstdc++6 is unpacked, but has never been configured.
dpkg: error processing /var/cache/apt/archives/apt_0.8.15.10_armhf.deb
(--unpack):
pre-dependency problem - not installing apt
For some reason, debootstrap (or perhaps it is actually dpkg) can't
properly figure out that the libstdc++6 package must be configured
before it attempts to install apt. This is the only error of this
kind and I can't tell what might be different about how apt package
uses libstdc++ as a pre-depend. Other packages don't fail in this manner.
I've googled this error, but I haven't found specific information on
how to understand what's happening and fix the issue. I mostly find
bug reports that simply indicate the issue is not that uncommon.
Any insight someone could provide into debootstrap/dpkg pre-dependency
issues would be very helpful.