[英]Apache 2.4 on Ubuntu: “Can't load driver file apr_dbd_oracle.so”
I'm running Ubuntu 17.04. 我正在运行Ubuntu 17.04。 I have an application running in Wildfly 10.1.0 and am trying to use Apache 2.4 to force the user to log in when they browse to the app URL.
我有一个在Wildfly 10.1.0中运行的应用程序,我正在尝试使用Apache 2.4强制用户在浏览应用程序URL时登录。 I have got this working on a Windows environment and was hoping it would be as simple as copying my Apache config files over to the Ubuntu box, but it's not.
我已经在Windows环境中工作,并希望它就像将我的Apache配置文件复制到Ubuntu框一样简单,但事实并非如此。
I added the line below to httpd.conf 我将下面的行添加到httpd.conf中
Include conf/extra/dbd.conf
Contents of conf/extra/dbd.conf: conf / extra / dbd.conf的内容:
DBDriver oracle
DBDParams user=xx;pass=yy;server=zz
DBDMin 2
DBDKeep 4
DBDMax 10
DBDExptime 300
I then tried to restart Apache using the command: 然后我尝试使用以下命令重启Apache:
sudo /usr/local/apache2/bin/apachectl restart -f /usr/local/apache2/conf/httpd.conf
I get the message: 我收到消息:
AH00526: Syntax error on line 1 of /usr/local/apache2/conf/extra/dbd.conf
Can't load driver file apr_dbd_oracle.so
I followed this tutorial on how to build the file apr_dbd_oracle.so. 我按照本教程介绍了如何构建文件apr_dbd_oracle.so。 I have attempted to verify that apr_dbd_oracle.so was built properly by running the command:
我试图通过运行命令来验证是否正确构建了apr_dbd_oracle.so:
ldd /usr/local/apr/lib/apr-util-1/apr_dbd_oracle.so
Which produces output: 哪个产生输出:
linux-vdso.so.1 => (0x00007ffc2d3f6000)
libclntsh.so.11.1 => /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1 (0x00007f92d4b0e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f92d48d7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f92d4510000)
libnnz11.so => /u01/app/oracle/product/11.2.0/xe/lib/libnnz11.so (0x00007f92d4148000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f92d3f44000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f92d3c39000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f92d3a20000)
libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1 (0x00007f92d381e000)
/lib64/ld-linux-x86-64.so.2 (0x0000561dd2f8b000)
I'm not a Linux expert but I suspect that if the .so file was corrupt then ldd would not produce this output. 我不是Linux专家,但我怀疑如果.so文件损坏,那么ldd就不会产生这个输出。 I conclude from this that apr_dbd_oracle.so works but Apache can't find it.
我从中得出结论,apr_dbd_oracle.so可以正常工作,但Apache无法找到它。 I have tried copying the file to various locations, both by duplicating the file and creating symbolic links.
我尝试通过复制文件和创建符号链接将文件复制到不同的位置。 I have also tried Googling where Apache looks for the file but no luck.
我也尝试过Googling,Apache寻找文件,但没有运气。
Can anyone clarify the directory that Apache expects the file apr_dbd_oracle.so to be in? 任何人都可以澄清Apache期望文件apr_dbd_oracle.so所在的目录吗? Thanks in advance.
提前致谢。
From our conversation earlier: 从我们之前的谈话:
Configuration of shared libraries for root access is different to the logged in user. 用于root访问的共享库的配置与登录用户不同。
Try executing without sudo to see if it's a configuration issue. 尝试在没有sudo的情况下执行,看看它是否是配置问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.