You can't*. That's the point of shared hosting. It's shared. If
everyone could run arbitrary terminal commands, each user could walk
all over the others, since they're all part of the same logical OS
installation (this would be possible, at least, without a very tight
security policy).
*: Some hosting providers might be willing to provide a binary of
PhantomJS if you ask nicely, or there may be ways to indirectly put it
on the system... but usually your challenge will be to set its
executable bit so you can run it.
If you replace "phantomjs" with "virus" in your question, you can
understand why the shared hosting provider wouldn't want to allow you
to do this.
A VPS or dedicated server is clearly the answer here.
> --
> You received this message because you are subscribed to the Google Groups
> "phantomjs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
phantomjs+...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/phantomjs.
> For more options, visit
https://groups.google.com/d/optout.