环境为Unbuntu 22.04,安装完phantomjs后验证安装时报如下错误:
cj@vm-ubuntu:/usr/local/bin$ phantomjs --version
Auto configuration failed
140372441778112: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
140372441778112:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
140372441778112:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers
140372441778112:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers
解决方法:在环境变量中加入如下值,使phantomjs能够找到指定的文件
export OPENSSL_CONF=/etc/ssl
再次验证后没有问题了
cj@vm-ubuntu:/usr/local/bin$ phantomjs --version
2.1.1
在Ubuntu22.04环境下,安装PhantomJS后遇到Autoconfiguration失败的错误,原因是系统找不到libproviders.so文件。通过将OPENSSL_CONF环境变量设置为/etc/ssl,成功解决了问题,使得PhantomJS能正常运行并显示版本为2.1.1。
8576

被折叠的 条评论
为什么被折叠?



