Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8560623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:19:04+00:00 2026-06-11T16:19:04+00:00

I realize Running PhantomJS on Heroku is a related but slightly different question as

  • 0

I realize “Running PhantomJS on Heroku” is a related but slightly different question as I am trying to use a node app.

I’m having trouble deploying a casperJS (based on phantomJS) script for a node app. I’ve tried deploying to Heroku by placing the PhantomJS 64-bit binary in my app’s /bin directory, but I get the following error when I try to run PhantomJS:

phantomjs: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory

From what I’ve read this can be solved by installing the QtWebKit library, but Heroku does not have this installed. Is there another hosting provider I could use that will work or a way to install this package on Heroku?

Relevant code:

app.get('/', function(request, response) {
  var sys = require('sys')
  var exec = require('child_process').exec;
  var child;

  //works but gives error while loading shared library libqtwebkit.so.4
  child = exec("phantomjs --version | tr -d '\n'", function(error, stdout, stderr) {
    sys.print('stdout: ' + stdout);
    sys.print('stderr: ' + stderr + '\n');
    response.header('Content-Type', 'application/json');
    response.send('_testcb(stdout:' + stdout + '\nstderr:' + stderr + ')', 200);
    if(error !== null) {
      console.log('exec error: ' + error);
    }
  });
});

I’ve signed up for beta-testing on Nodester but their documentation is still pretty limited at this point.

EDIT: I was able to get it working by simply copying the lib folder of PhantomJS to the root directory of my node app.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:19:06+00:00Added an answer on June 11, 2026 at 4:19 pm

    Copy the lib folder of phantomjs to the root directory of your node app
    You could also try putting a sym link in bin or sbin
    The key is that is has to run from terminal using the same account that node runs on.
    Also, node-phantom is a good npm library to utilize phantomjs, once you get it working.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Ubuntu server on linode running a node.js/mongo app. I realize I
I realize that this question is slightly server related and could be posted on
I realize that a SO user has formerly asked this question but it was
I realize this is a ridiculous request, but what I'm trying to do is
I realize that this question has been asked and has been answered here but
I'm having trouble modeling a data structure in Haskell. Suppose I'm running an an
I realize this question is very likely to have been asked before, but I've
I realize there is a similar question to this, but it really has no
The problem that I'm having is when running my android app, if I run
I have an application up and running on Heroku with Express.js on Node.js with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.