search

Home  >  Q&A  >  body text

php - When compiling and installing the lnmp environment in Linux, does the GD library need to be downloaded and installed separately?

PHP has its own gd library, but during compilation and installation, do you need to download and install the gd library separately? Or can you just use the one that comes with PHP? However, many people on the Internet do not directly use PHP's GD library. Download and install GD separately.

大家讲道理大家讲道理2771 days ago588

reply all(6)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 12:59:59

    Required, --with-gd=path

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-16 12:59:59

    If you are centos, you need to rely on jpeg and freetype
    yum install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel zlib zlib-devel glibc glibc-devel -y
    After installing the dependencies
    just add the following parameters when configuring
    --with-freetype-dir=/usr/lib64
    --with-gd
    --with-jpeg-dir=/usr/lib64
    --with-png-dir=/usr/lib64

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-16 12:59:59

    If necessary, if you find it troublesome, you can directly install the compiled binary package php-gd.

    reply
    0
  • 为情所困

    为情所困2017-05-16 12:59:59

    ? ? What comes with PHP is not a library, but an extension. Extensions depend on libraries. Extensions call the functions provided by the library, but do not provide functions themselves. This is also the role of PHP extensions. Therefore, you must install the GD library additionally. The methods of installing the library are generally divided into compile installation and package installation.

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-16 12:59:59

    apt install xxxxx

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-16 12:59:59

    Needs to be installed separately, you can compile or choose yum (or apt) to install.

    reply
    0
  • Cancelreply