Press "Enter" to skip to content

php7.4安装gd库

  385  wget http://www.zlib.net/zlib-1.2.11.tar.gz
  386  tar -zxvf zlib-1.2.11.tar.gz 
  387  cd zlib-1.2.11/
  388  ls
  389  ./configure --prefix=/usr/local/zlib
  390  make && make install
  391  cd ..
  392  wget https://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.gz
  393  ls
  394  tar -zxvf freetype-2.9.tar.gz 
  395  cd freetype-2.9/
  396  ls
  397  ./configure --prefix=/usr/local/freetype
  398  make && make install
415  wget https://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz
  416  tar -zxvf libpng-1.6.37.tar.gz 
  417  cd libpng-1.6.37/
  418  ./configure --prefix=/usr/local/libpng
  419  make && make install
  420  cd ..

 yum install libjpeg libjpeg-devel

  422  wget  http://www.ijg.org/files/jpegsrc.v9d.tar.gz
  423  ls
  424  tar -xzvf jpegsrc.v9d.tar.gz 
  425  cd jpeg-9d/
  426  ls
  427  ./configure --prefix=/usr/local/libjpeg --enable-shared
  428  make && make install
  429  cd ..
  430  ls
  431  cd php-7.4.20/
  432  cd ext/
  433  ls
  434  cd gd/
  435  ls
  436  /usr/local/php/bin/phpize 
  437  ./configure --with-php-config=/usr/local/php/bin/php-config --with-jpeg=/usr/local/libjpeg --with-freetype=/usr/local/freetype

https://www.php.net/manual/zh/migration74.other-changes.php#migration74.other-changes.pkg-config

  438  make && make install
  439  vim /usr/local/php/etc/php.ini 
  440  systemctl restart php-fpm.service

发表评论