@EliahKagan There seems to be some progress towards clarifying this question in comments posted after you posted your comment. Maybe editing the question would help now.
@Natty feedback askubuntu.com/a/1160582 When I ran the command in the answer it worked, so I don't know why this answer was downvoted.
What worked, exactly? That answer runs a command, takes its output (with trailing newlines removed), performs word splitting and globbing on it, and passes the resulting words as arguments to [ where they are treated as a test and operands. If it seems to work, that's a coincidence. To test the output of a command with if, you just write the command after if.
Here's a trivial example of that answer not working:
if [ $(true) ]; then echo "succeed"; fi
It's probably not NAA. But it's definitely a totally wrong answer.
I meant to say "to test the result of a command with if..."
$() performs command substitution. If the result contains no globbing characters or IFS characters, it's treated as a single word. In that situation, placing it between [ and ] tests if it's nonempty; the [ command succeeds if it's nonempty and fails if it's empty.
That has absolutely nothing to do with the exit status of the substituted command itself.
What the command the answer suggests is actually doing is entirely unrelated to testing if the command written in place of command succeeded. But what it actually does is immensely complicated; to predict it requires considering every test supported by [ as well as the details of command substitution, pathname expansion (globbing), and word splitting.
I don't think it's good to post huge multi-comment treatises about why answers are wrong, so I'm trying to come up with a way to summarize the problem, but the only way to do that tersely is by relying heavily on links, and I haven't figured out a way to fit enough in to actually explain the problem. I'll come up with something, hopefully.
[ SmokeDetector | MS ] Url-only title, blacklisted website in title, potentially bad ns for domain in title, potentially bad keyword in body, potentially bad keyword in title (202): awaretalks.com/balanced-body-keto/ by petrionskaris on askubuntu.com
[ SmokeDetector | MS ] Url-only title, blacklisted website in title, potentially bad ns for domain in title, potentially bad keyword in body, potentially bad keyword in title (202): awaretalks.com/balanced-body-keto/ by petrionskaris on askubuntu.com
On the second one, I italicized the "as EOL" part because there's an argument for closing that one as no-repro. (I didn't vote to close it, though.)
I'm not sure if that comment is the most effective way to communicate that OT > EOL is only for questions about releases that were EOL when the question was posted, but feel free to use it or some variation on it.
@EliahKagan Can you please update your answer? Please change the website in Since VMware Player is not provided by the repositories, you have to instead download it here at the VMware website. since the mentioned website hosts outdated workstation.
@Kulfy Please definitely feel free to do the edit! That sort of edit is fine even without asking the author. :)
If you prefer not to edit then I will. But you may as well do it. The best link I can find for downloading current versions is my.vmware.com/web/vmware/free#desktop_end_user_computing/…, which will become out of date over time as well but would be an improvement over what's there. Maybe there's something better though. Either way definitely feel free to edit or, if you prefer, I can do it.
Do we have some generic post for VMWare installation? The accepted answer on this seems to target an issue which I think wouldn't be there after 7 long years.
The links are no longer available too. Users tend to try the accepted or highest voted answer first. And I think they won't be helped by that answer anyway.
@Kulfy The content is copied, as you mentioned. I flagged NAA, even though that doesn't quite fit; the situation seems clear enough that a custom mod flag isn't really necessary. I've also downvoted and voted to delete the post.
Regarding build-essential: VMware may need a compiler installed in order to automatically build kernel modules. I haven't installed a recent version VMware Workstation on a recent version of Ubuntu, so I don't know if it needs a compiler (and kernel headers), but I suspect it does.
@Kulfy I've edited, though quite conservatively. I've basically retained some variation of everything in the post, including the workaround that I had mentioned at the end. I suspect a number of the votes on the post may have been about that rather than the instructions themselves. If it's totally clear that this workaround is unlikely to help anybody anymore, it can simply be removed, or replaced with a link to the version history of the post, or something.
Similarly, if having a compiler and kernel headers is no longer ever necessary (I'm not in a position to test this right now) then that section of my post should at minimum be edited to mention that it's only needed for older versions. In short, there's potentially more editing to do (and feel free to edit it yourself if you like!). But I think I've addressed the most important shortcomings.
@Kulfy Well, if the whole answer documents only old versions, then yes, perhaps. Otherwise I think material known to be outdated could just live in the older revisions, accessible through the revision history (which, except in the unusual case of redacted revisions, continues to be both accessible on the site and archived in data dumps) and, if of sufficient interest, linked to from the current version of the post.
@Kulfy Thanks.
Note that's it's not really build-essential that you should try installing it without, though, because that's just a metapackage.
You should make sure you don't have any version of gcc or any kernel headers installed.
build-essential causes gcc to be installed by depending on it, but removing build-essential doesn't remove gcc (and may or may not make gcc eligible for automaitc removal depending on whether or not anything else is depending on gcc and whether or not gcc was ever manually installed or marked so).
Also, I've noticed answers whose main problem is being wrong (including that one) that have accrued more delete votes than downvotes (it had zero downvotes when I saw it and one delete vote). That doesn't seem to me like a correct use of the system. When an answer is so factually inaccurate as to have no value whatsoever and even merit deletion, doesn't that make it the clearest possible case of a post that should be downvoted?