Don't know about the error, but I'm using this command to build debs inside scratchbox: dpkg-buildpackage -rfakeroot -tc