ubuntu上php7安装pdo-mysql扩展

时间:2022-09-19 14:54:58

对php7进行重新编译

  1. 进入php的源文件目录 cd Downloads/php-7.0.11
  2. make clean先将上次编译的结果清除掉
  3. ./configure –prefix=/usr/local/php7 –with-config-file-path=/usr/local/php7/etc –with-apxs2=/usr/local/httpd/bin/apxs –with-iconv-dir=/usr/local/lib –enable-mysqlnd –with-pdo-mysql=mysqlnd
  4. make ZEND _EXTRA _LIBS=’-liconv’
  5. sudo make install
  6. 执行php -m就会看到ubuntu上php7安装pdo-mysql扩展