Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm phantomjs-prebuilt: "failed to detect theversion" on ubuntu hiding source error #20

Open
rosskevin opened this issue Oct 3, 2016 · 4 comments

Comments

@rosskevin
Copy link

I am using docker for my CI, and running cucumber inside the ubuntu container is failing to find phantomjs version that was installed with npm.

cliver: /var/lib/gems/2.3.0/gems/cliver-0.3.2/lib/cliver.rb

The detector #<struct Cliver::Detector command_arg=nil, version_pattern=nil> failed to detect theversion of the executable at '/app/node_modules/phantomjs-prebuilt/bin/phantomjs'

I'm using phantomjs-prebuilt:

root@5036dec3f7b6:/app# npm ls phantomjs-prebuilt
af@1.0.0 /app
+-- phantomjs-prebuilt@2.1.12 

It seems my environment wasn't properly setup with libfontconfig as I couldn't run:

root@6c2f2f7605a3:/app# /app/node_modules/phantomjs-prebuilt/bin/phantomjs --version

After my docker image was fixed with the dependency, I had no problem. Perhaps the error raised could be modified with the underlying stderr so one could more easily see the source of the problem?

@anthonyto
Copy link

Hey @rosskevin, how were you able to resolve this? I am running into the same error with MacOS Sierra

@rosskevin
Copy link
Author

apt-get install libfontconfig in my dockerfile

@anthonyto
Copy link

Seems like I had a different issue that I was able to get resolved, but thanks for the quick answer

@DeeDeeG
Copy link

DeeDeeG commented Oct 26, 2019

On a Debian 10 "Buster" - based Docker image (ruby:2.5.7-slim) I have this same error for a different reason.

When I boot up the Docker image and run phantomjs --version, here is the error message I get:

root@hash:/path# phantomjs --version
Auto configuration failed
139835853319808:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
139835853319808:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139835853319808:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139835853319808:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf

A workaround (from this StackOverflow question: https://stackoverflow.com/questions/53355217/genymotion-throws-libssl-conf-so-cannot-open-shared-object-file-no-such-file-o) is to set an environment variable as follows: OPENSSL_CONF=/etc/ssl/.

(For Docker, you'll want to set it in a way that is persistent, like having the following as one of the steps in your Dockerfile: ENV OPENSSL_CONF=/etc/ssl/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants