ariya / phantomjs

Scriptable Headless Browser
http://phantomjs.org
BSD 3-Clause "New" or "Revised" License
29.46k stars 5.76k forks source link

Auto configuration failed #15449

Closed r3dpars3c closed 4 years ago

r3dpars3c commented 4 years ago

Hello i got the following error after runnig the below command

root@kali:/home/kali/Desktop# phantomjs hello.js Auto configuration failed 140356851656640: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 140356851656640:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 140356851656640:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf 140356851656640:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf

jgonggrijp commented 4 years ago

@Aaryan9898 Did you solve the problem, and if so, would you mind sharing the solution? Thanks in advance.

r3dpars3c commented 4 years ago

Yes the following worked for me Just Uncomment the following line putting # in /etc/ssl/openssl.cnf [default_conf]

ssl_conf = ssl_sect

x-yuri commented 4 years ago

In my case, the line was not commented out. What helped me is:

$ OPENSSL_CONF=/etc/ssl phantomjs --version

Debian 10, PhantomJS 2.1.1.

Auto configuration failed
139776298270336: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
139776298270336:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139776298270336:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139776298270336:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf
snowc0de commented 3 years ago

I am having the same issue. None of those things worked for me :(

JanTrotnow commented 3 years ago

Just had the same issue a few moments ago. Using OPENSSL_CONF=/etc/ssl fixed it for me.

I wonder what is causing this as I didn't update any specific packages. Do you have any idea?

benz0li commented 3 years ago

Most probably related to openssl-1.1.1: See https://wiki.debian.org/ContinuousIntegration/TriagingTips/openssl-1.1.1 for more information.

On Debian, the problem occurs with versions >= 10 (buster). On Ubuntu LTS with versions >= 20.04. https://github.com/ariya/phantomjs/issues/15449#issuecomment-680228630 should work.

x-yuri commented 3 years ago

@JanTrotnow Didn't update any npm packages? OS packages? What operating system? Do you have unattended-upgrades installed?

func0der commented 3 years ago

The issue should be re-opened until we undertand it and find out, who is responsible for fixing it.

Please re-open

xtaraim commented 3 years ago

it works !

OPENSSL_CONF=/etc/ssl phantomjs --version

MincoMK commented 3 years ago

export OPENSSL_CONF=/etc/ssl

joshheinrichs-shopify commented 2 years ago

As far as I can tell, the only reason the above suggestion works is because you're supposed to point OPENSSL_CONF at a config file, not a directory. The above is effectively equivalent to OPENSSL_CONF=/dev/null.

x-yuri commented 2 years ago

Now that would be funny. From what I can see I found the solution here.

MostHated commented 1 year ago

Strange, doing either: export OPENSSL_CONF=/dev/null; phantomjs --version or OPENSSL_CONF=/dev/null phantomjs --version , etc (or actually setting export OPENSSL_CONF=/dev/null in my profile exports) does not work for me in zsh, but if I open powershell and do $env:OPENSSL_CONF="/etc/ssl"; phantomjs --version, that does work.

x-yuri commented 1 year ago

Depending on your OS, you might want to try it with strace.

coelhocao commented 1 year ago

Yes the following worked for me Just Uncomment the following line putting # in /etc/ssl/openssl.cnf [default_conf] #ssl_conf = ssl_sect

I'm using Ubuntu LTS 20.04. I don't know where this configuration is found/done to solve it. Could someone point me there? Is it when installing phantomjs from a terminal?

bdteo commented 1 year ago

Yes the following worked for me Just Uncomment the following line putting # in /etc/ssl/openssl.cnf [default_conf] #ssl_conf = ssl_sect

I'm using Ubuntu LTS 20.04. I don't know where this configuration is found/done to solve it. Could someone point me there? Is it when installing phantomjs from a terminal?

You can do the following. It will still work:

# download binary openssl packages from Impish builds
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2.16_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2.16_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb

# install downloaded binary packages
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
sudo dpkg -i libssl-dev_1.1.1f-1ubuntu2.16_amd64.deb
sudo dpkg -i openssl_1.1.1f-1ubuntu2.16_amd64.deb

Cheers!

x-yuri commented 1 year ago

download binary openssl packages from Impish builds

@bdteo What makes them Impish? Looks Focalish to me: https://packages.ubuntu.com/focal/openssl (1.1.1f-1ubuntu2.16) https://packages.ubuntu.com/impish/openssl (1.1.1l-1ubuntu1.6)

RakeshSuvvari commented 1 year ago

Just had the same issue a few moments ago. Using OPENSSL_CONF=/etc/ssl fixed it for me.

I wonder what is causing this as I didn't update any specific packages. Do you have any idea?

This works for me on Ubuntu 22.04 Thanks

DemOnJR commented 1 year ago

Just use

export OPENSSL_CONF=/etc/ssl/

Then again

phantomjs --version

Result

2.1.1