So we can end the wild goose chase around build-essential here... It would be
much faster if we knew from beginning what you're trying to do. :)
Packages depend on other packages. In order to find out what packages package
A depends on you can use the commandapt-cache depends A
Now, note that if A depends on B, B might depend on C, which might depend on
D and E... some of those might already be installed.
Try it a bit.
So now you see it might be a quite large number of dependencies. And this is
where apt-offline comes in. It'll do the heavy lifting for you.