user26732
user26732

Reputation: 327

Phantomjs won't install: Autoconfiguration Error

When trying to install Phantomjs on Ubuntu 22.04, I get the following error: There are some Q.& A's here from 2015-2022, I tried all of the included suggestions.

https://github.com/ariya/phantomjs/issues/10904

https://gist.github.com/julionc/7476620

wkhtmltopdf - libfontconfig.so.1: cannot open shared object file

http://ubuntuhowtoo.blogspot.com/2019/05/linux-nodejs-phantomjs-error-loading.html

Auto configuration failed
139998593603520:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libproviders.so): libproviders.so: cannot open shared object file: No such file or directory
139998593603520:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139998593603520:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers
139998593603520:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers```


Upvotes: 21

Views: 15522

Answers (4)

NotI.mportant
NotI.mportant

Reputation: 51

For CI builds it's better to use the below at the image level if possible, or inside the build:

sudo sed -i 's/openssl_conf = openssl_init/#openssl_conf = openssl_init/g' /etc/ssl/openssl.cnf

Upvotes: 0

vishal sharma
vishal sharma

Reputation: 190

i tried

export OPENSSL_CONF=/dev/null (with normal npm start command working fine with pm2 command still throwing error)

OR

I suggest you to comment out the lines providers = provider_sectin in the file/etc/ssl/openssl.cnf it will work perfectly

Upvotes: 0

ravi singhal
ravi singhal

Reputation: 39

Above answer is little about as I am describing.

Step:1 First stop your node server then run this command in base directory.

Step:2 I suggest you to comment out the lines providers = provider_sectin in the file/etc/ssl/openssl.cnf

Step:3 Start your application

Brief ref. https://github.com/nodejs/node/issues/43132

Upvotes: 0

kry kra
kry kra

Reputation: 631

I had the same issue and fixed it by setting export OPENSSL_CONF=/dev/null prior to phantomJS usage. If it's not possible for you to disable openssl then you would have to pack you application with older OpenSSL version.

Explanation: Ubuntu 22.04 uses the new OpenSSL version 3.0.2 instead of the older OpenSSL version 1.1.1 . These OpenSSL versions are not fully compatible, so this is why you see this error when PhantomJS tries to auto configure the SSL/TLS settings.

Upvotes: 53

Related Questions