问题初现
在离线安装完 rpa 模块、tagui 后执行初始化卡住
r.init(headless_mode=True)
- 找到 tagui 的安装目录,在命令行执行 ./tagui 测试效果,回显 php 命令未找到,安装之
- 继续测试,发现测试 curl 不存在,继续安装之
问题之二
继续在命令行测试效果,报错如下:
Auto configuration failed
124623513679808: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
124623513679808:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
124623513679808:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers
124623513679808:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers
尝试使用 python 执行,错误相同
>>> import rpa as r
>>> r.init(headless_mode=True)
[RPA][ERROR] - following happens when starting TagUI...
The following command is executed to start TagUI -
"/root/.tagui/src/tagui" rpa_python headless
It leads to following output when starting TagUI -
Auto configuration failed
124623513679808: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
124623513679808:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
124623513679808:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers
124623513679808:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers
弯弯绕绕
上面显示的错误关键字是 dso
和 libproviders.so
,检索这两个库一直都没有结果,并且跟其他操作系统对比,都没有 libproviders.so
这个文件,所以猜测根本原因并不是缺少这个库文件
不过在检索这两个错误的时候,发现了关键词 ssl
和 phantomjs
,所以怀疑是 phantomjs
组件导致的错误,tagui 使用了这个组件我是可以确定的,所以直接进入 phantomjs/bin
目录下调用命令,果然出现的错误一致
继续通过 ldd 命令检查需要的库文件
root@succez:~/.tagui/src/phantomjs/bin# ldd ./phantomjs
linux-vdso.so.1 (0x00007ffdc2fd2000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x000072e0ec126000)
libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x000072e0ec0dc000)
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x000072e0ec014000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x000072e0ec00f000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x000072e0ec00a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x000072e0ec005000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x000072e0ebc00000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000072e0ebf1c000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000072e0ebefc000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000072e0eb800000)
/lib64/ld-linux-x86-64.so.2 (0x000072e0ec153000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x000072e0ebecb000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x000072e0ebec2000)
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x000072e0ebe85000)
libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x000072e0ebe77000)
libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x000072e0ebe54000)
可以看到 linux-vdso.so.1
库文件跟报错是相似的,并且没有显示文件路径,是不存在导致的错误吗?
又跟其他正常机器进行了对比,确定也是没有此文件的,并且其他运行 tagui、phantomjs 命令正常的机器 ldd 显示的内容一致,至此问题毫无头绪
峰回路转
所以还是尝试排查最初的问题,通过检索 DSO support routines:dlfcn_load:could not load the shared library
这一段,发现 /etc/ssl/openssl.cnf
文件和 phantomjs 有关系,根据建议解决方案,把如下两行注释
[openssl_init]
#providers = provider_sect
#ssl_conf = ssl_sect
再次测试成功运行
评论