简体   繁体   English

Ubuntu上的Apache 2.4:“无法加载驱动程序文件apr_dbd_oracle.so”

[英]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.

相关问题 无法为模块DBD :: Oracle:'libclntsh.so.12.1'加载'/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' - Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.12.1 获取错误install_driver(Oracle)失败:无法加载'/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so' - getting error install_driver(Oracle) failed: Can't load '/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so' 为什么在将 rpmbuild 用于 apr-util-1.6.1.tar.bz2 时,由于缺少文件 apr_dbd_odbc* 而出现错误? - Why am I getting an error for missing file apr_dbd_odbc* when using rpmbuild for apr-util-1.6.1.tar.bz2? [01000] [unixODBC] [驱动程序管理器]无法打开lib'/usr/local/easysoft/oracle/InstantClient112/lib/libsqora.so':找不到文件 - [01000][unixODBC][Driver Manager]Can't open lib '/usr/local/easysoft/oracle/InstantClient112/lib/libsqora.so' : file not found Ubuntu 12.04 PHP 5.5和apache2 2.4 - Ubuntu 12.04 PHP 5.5 and apache2 2.4 [unixODBC][驱动程序管理器]无法打开 lib '/usr/lib/libmyodbc.so' : 文件未找到但文件存在 - [unixODBC][Driver Manager]Can't open lib '/usr/lib/libmyodbc.so' : file not found but file exist 在Linux上将自定义Apache 2.4模块与httpd / apr库静态链接时出现错误 - Errors when linking a custom Apache 2.4 modules statically with httpd/apr libraries on Linux DBD-Oracle(1.74 或 1.76)与 oracle Instantclient 11.2 on win10 wsl ubuntu - DBD-Oracle (1.74 or 1.76) with oracle instantclient 11.2 on win10 wsl ubuntu 无法在Ubuntu上的Eclipse中从Java加载文件 - Unable to load so file from Java in Eclipse On Ubuntu Tomcat无法在Ubuntu中加载我的Web应用程序 - tomcat can't load my webapp in ubuntu
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM