As the tour says:
With your help, we're working together to build a library of detailed
answers to every question about Ubuntu.
This shows why closing a question is no substitute for answering it, and why it's no good to close a question as a shortcut to making it no longer look unanswered. We must always consider the impact on future users of the site. We may have the information they need... but are they going to be able to find it? Are they going to be able to judge how useful it is?
When a question looks like it is not answered, and looks like the community has considered it not worth answering, and then someone comes along with the same problem, odds are they're not going to know the question has been answered obscurely in a comment... if they even end up finding the question at all.
If there's a problem, and there's a solution, and the solution might possibly help someone else, then -- as Byte Commander says and Zacharee1 has further explained -- the question should be answered, not closed.
There is also the matter that, as Shog9 has said (in a post about another issue):
Closing is primarily a path to deletion
With the exception of questions that are closed as duplicates, unanswered closed questions that haven't been upvoted or recently edited become eligible for automatic deletion by the Stack Exchange system, with no user or moderator action necessary after 9 days. (See #7 in this answer.)
In addition, 10k users can vote to delete any closed question. Of course, we're supposed to think before we click the delete button, and usually we do, but:
- Like anyone, we make mistakes sometimes.
- If a question looks like it is not answered, and looks like the community has considered it not worth answering, it's pretty darn easy to make a mistake. Especially if someone decided to close it because it was answered somewhere in a giant wall of comments, instead of answering it with the solution.
Now, I'm not saying no questions should be closed! Many questions should be closed, and some have no value at all to anyone and really should be deleted, too. But closing a question is not a way of showing the OP's problem has been solved, and I think examining the connection between closure an deletion helps make that clear.
There's a related question to the one you've asked, which is: Why can only the user who asked the question mark an answer as accepted? For information on that, I recommend this question, that one, and related questions on Meta.SO and on Meta.SE (also this and that).