php7 安装mssql 扩展

一、 Install the Microsoft PHP Drivers for SQL Server

[root@w91 source]# yum -y install php-pear php7.0-dev

[root@w91 source]# pecl install sqlsrv
[root@w91 source]#pecl install pdo_sqlsrv

执行到第二条时出现问题:

解决方式:

1、安装c++11 gcc4.8.x

[root@w91 home]wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo 

[root@w91 home]yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++

[root@w91 home]yum install devtoolset-2-gcc-gfortran 

[root@w91 home]yum install devtoolset-2-binutils-devel

[root@w91 source]# ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/

[root@w91 source]# hash -r

[root@w91 source]# gcc --version
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  

  

2、

猜你喜欢

转载自www.cnblogs.com/xzlive/p/9187838.html
今日推荐