Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

PhantomJS support for El Capitan #44535

Closed
3zcurdia opened this issue Oct 2, 2015 · 9 comments
Closed

PhantomJS support for El Capitan #44535

3zcurdia opened this issue Oct 2, 2015 · 9 comments

Comments

@3zcurdia
Copy link

3zcurdia commented Oct 2, 2015

No description provided.

@DomT4
Copy link
Contributor

DomT4 commented Oct 2, 2015

See #42249 (comment).

It's an upstream issue, not a Homebrew one. You can try brew update && brew install phantomjs --HEAD but there are no guarantees that will succeed.

@DomT4 DomT4 closed this as completed Oct 2, 2015
@leandroalemao
Copy link

As a workaround.. I've downgraded to 1.9.8.. it's working.. but too slow.

npm install phantom phantomjs -g

@joaquinalcerro
Copy link

I have Apple OS X - El Capitan and I did the following and looks like it's working:

sudo npm -g install phantomjs2

When I executed this command, If failed installing.... it never finished but the phantomjs v2 gets downloaded to this directory

/usr/local/lib/node_modules/phantomjs2/phantomjs/phantomjs-2.0.0-20141016-macosx.zip-extract-1447034534278/phantomjs-2.0.0-20141016

It will contain a bin and examples directory

Go into the bin directory where you will find the phantomjs file 50MB approximately.

Check in what directory phantomjs file located:

which phantomjs (i got = /usr/local/bin/phantomjs but this file points to: /usr/local/lib/node_modules/phantomjs2/bin/phantomjs)

As root (sudo cp) copy the downloaded phantomjs file to this directory (in my case = /usr/local/lib/node_modules/phantomjs2/bin/). NOTE: the last part, phantomjs is the file name. Don't include it.

Check that this file is executable. If it is not executable, use chmod to make it executable.

Phantomjs should be installed now.

Try

phantomjs --version

@camwhite
Copy link

Thank you for the tips @joaquinalcerro !!!

Disregard I got it working 👍

  1. sudo npm install phantomjs2 -g (it will hang)
  2. cd /usr/local/lib/node_modules/phantomjs2/phantomjs/phantomjs-2.0.0-20141016-macosx.zip-extract-1447034534278/phantomjs-2.0.0-20141016/bin
  3. sudo cp phantomjs /usr/local/lib/node_modules/phantomjs2/bin/
  4. phantomjs -v 2.0.0(dev)

I am running into an issue while attempting to copy the phantomjs file. I am seeing this error:

sudo cp /usr/local/lib/node_modules/phantomjs2/bin/phantomjs /usr/local/lib/node_modules/phantomjs2/bin

cp: /usr/local/lib/node_modules/phantomjs2/bin/phantomjs and /usr/local/lib/node_modules/phantomjs2/bin/phantomjs are identical (not copied).

I'm prob just doing it wrong 😫 Would you mind elaborating at all?

Update

Upon executing ./phantomjs in the /bin dir
I am seeing this error:

internal/child_process.js:274
  var err = this._handle.spawn(options);
                         ^

TypeError: Bad argument
    at TypeError (native)
    at ChildProcess.spawn (internal/child_process.js:274:26)
    at exports.spawn (child_process.js:339:9)
    at Object.<anonymous> (/usr/local/lib/node_modules/phantomjs2/bin/phantomjs:22:10)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:117:18)

Also happens while trying phantomjs -v

@Gcamara14
Copy link

Hey guys! I managed to by pass this by using -

brew install npm
npm install phantom phantomjs -g

@akash227
Copy link

#Gcamara14 Thank you! It worked for me

@dantmcgowan
Copy link

#Gcamara14 +1 thx

@cshutchinson
Copy link

#Gcamara14 Thank you! It worked for me

@gregrenard
Copy link

Thank you ! It worked too for me.

@Homebrew Homebrew locked and limited conversation to collaborators Nov 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants