gpt4 book ai didi

PHP 警告 : PHP Startup: Unable to load dynamic library 'sqlsrv.so'

转载 作者:行者123 更新时间:2023-12-04 18:50:40 27 4
gpt4 key购买 nike

嗨,我最近在我的机器上安装了 SQL Server。它有 Ubuntu 16.04 LTS 操作系统。

我关注了this link为 PHP 7.2 安装服务器扩展,现在我收到了这些 PHP 警告:

PHP Startup: Unable to load dynamic library 'pdo_sqlsrv.so'(tried: /usr/lib/php/20170718/pdo_sqlsrv.so (/usr/lib/php/20170718/pdo_sqlsrv.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/pdo_sqlsrv.so.so (/usr/lib/php/20170718/pdo_sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

PHP Startup: Unable to load dynamic library 'sqlsrv.so' tried: /usr/lib/php/20170718/sqlsrv.so (/usr/lib/php/20170718/sqlsrv.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/sqlsrv.so.so (tried:/usr/lib/php/20170718/sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

最佳答案

我不知道这对你现在是否有用,但是当我尝试在我的 CentOS 8 中为 php 安装 sqlsrv dricer 时,这对我很有用

sudo su
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
exit
sudo ACCEPT_EULA=Y yum install msodbcsql
sudo yum install unixODBC-devel
yum groupinstall "Development Tools"
sudo yum install php-pear
sudo yum install php-devel
#IF_ERROR:
sudo yum install dnf-plugins-core
sudo yum config-manager --set-enabled powertools
sudo yum install php-devel
#END_IF_ERROR
sudo pecl install sqlsrv pdo_sqlsrv
sudo echo "extension=/usr/lib64/php/modules/sqlsrv.so" >> /etc/php.d/pdo.ini
sudo echo "extension=/usr/lib64/php/modules/pdo_sqlsrv.so" >> /etc/php.d/pdo.ini
按照这些步骤,我执行 php -m我使用 php 7.2 安装了 sqlsrv 和 pdo_sqlsrv。

关于PHP 警告 : PHP Startup: Unable to load dynamic library 'sqlsrv.so' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53447109/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com