[Nix-dev] npm instlall phantomjs not working correctly

Brian McKenna puffnfresh at gmail.com
Tue Oct 6 01:24:35 CEST 2015


I've had this problem before.

PhantomJS downloads and runs a binary. The binary it downloads doesn't
point to an actual linker on NixOS (hence the no such file error).

You can see this:

    $ ls -l $(patchelf --print-interpreter
node_modules/phantomjs/lib/phantom/bin/phantomjs)
    ls: cannot access /lib64/ld-linux-x86-64.so.2: No such file or directory

I think the solution is to have the nixpkgs phantomjs in your shell.
Then npm install will say something like this:

    PhantomJS is already installed at
/nix/store/r7hmkiz9ypbrs8liy7g660qvzxhdx0l4-phantomjs-1.9.8/bin/phantomjs.

On 6 Oct 2015 5:24 am, "Richard Wallace" <rwallace at thewallacepack.net> wrote:
>
> Hey folks,
>
> I'm having problems running phantomjs in a project that uses it for testing. When running `npm install` it gets installed correctly, but when I try and run it I'm told "No such file or directory".
>
> People on this issue <https://github.com/karma-runner/karma-phantomjs-launcher/issues/31> reported similar, and suggested that installing libfontconfig fixed it for them. I have installed fontconfig via nix-env but that doesn't seem to have helped.
>
> Any suggestions?
>
> Thanks,
> Rich
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>


More information about the nix-dev mailing list