The general advice is buy a pack to fit your gear (choose the pack last); this allows you to test-load the pack with your actual gear, to tweak the fit and also determine how convenient the pack will be to use (is the water bottle pocket large enough and reachable? What can I keep in the hipbelt pockets? That kind of thing.)

However, I agree with Gershon - if you're just starting out, it's not wrong to buy the pack first; the ability to borrow gear from your buddies is a good reason to get the pack first. Just don't go too small unless you've already decided you're going to head down a minimalist and/or ultralight path (and cost be damned!) If I were to recommend a size for a beginner, who indicated they wanted to use a synthetic sleeping bag and 2-person tent to start with, I'd recommend a 50 - 60 liter pack with a good suspension. Such a pack would probably range between 3 and 4+ pounds (if you're looking for a budget price, you might have to settle for a 5 pound pack. The general rule is light, cheap, and good - you can pick any two.) Eventually, you may be able to replace it with a 40 - 50 liter pack as you tweak your other gear - at which point the larger pack becomes your winter pack, when you have to carry extra clothes or other gear.