我正在尝试通过Ubuntu 7上的PHP 7连接到PervasiveSQL 11(在Windows上运行)。但是,odbc_connect函数失败,并显示以下错误消息
Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/usr/local/psql/lib64/libodbcci.so' : file not found, SQL state 01000 in SQLConnect in
我找到了先前的StackOverflow问题,其中也有类似的问题。但是,该解决方案似乎对我不起作用。
我尝试将以下内容添加到/etc/apache2/envvars
,但是尝试重新启动apache时出现错误
export PVSW_ROOT=/usr/local/psql
export PATH=$PVSW_ROOT/bin:/bin:/usr/bin
export LD_LIBRARY_PATH=$PVSW_ROOT/lib:$PVSW_ROOT/lib64:$PVSW_ROOT/bin:/usr/lib
export MANPATH=$PVSW_ROOT/man:$MANPATH
export BREQ=$PVSW_ROOT/lib
export LD_BIND_NOW=1
(在envvars中使用上述方法重启apache时出错):
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
systemctl status apache2.service
的结果:
Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.2.load: Cannot load /usr/lib/apache2/modules/libphp7.2.so into server: /usr/local/psql/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.60)