By definitiondefiniton, "unanswered" questions are questions that have no accepted answer or not any answer with a score of at least +1.
So if the answer is good enough, a simple upvote also marks the question as "answered". That's the easiest way.
Other than that, you can always leave a comment and ask the OP to accept an answer or to write the solution they posted in comments as a proper answer and accept it then. Alternatively, you can post the answer, optionally as Community Wiki if you want, and ask the OP to accept that one.
Other than that, you can vote to close (or flag as "should be closed") the question as Off-topic → not reproducible, which says in its close reason:
This describes a problem that can't be reproduced, that seemingly went away on its own, or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers.
Note though that a question should only be closed with this reason if the explanation above really applies. Just that there's a solution in the comments doesn't automatically justify closing the question. However in the second question you linked, where the comment stated that the problem "magically" solved itself and went away somehow, it's the right decision to close it.