Install the GD support library of PHP in Linux

Source: Internet
Author: User
Tags zts

GD: Linux install php gd support library 1, install zlib wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/zlib-1.2.3.tar.gz tar-zxf zlib-1.2.3.tar.gz cd zlib-1.2.3. /configure-prefix =/usr/local/zlib make install 2. install jpeg wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/jpeg-6b.tar.gz mkdir-p/usr/local/IPv6 mkdir-p/usr/local/IPv6/bin mkdir-p/usr/local/IPv6/lib mkdir-p/usr/local/jpeg 6/include mkdir-p/usr/local/users 6/man mkdir-p/usr/local/users 6/man1 mkdir-p/usr/local/users 6/man/man1 tar- zxf jpeg-6b.tar.gz cd jpeg-6b. /configure-prefix =/usr/local/release 6-enable-shared-enable-static make install installation completion prompt: Libraries have been installed in: /usr/local/release 6/lib 3. Install libpng wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/libpng-1.2.16.tar.gz tar-zxf libpng-1.2.16.tar. Gz cd libpng-1.2.16. /configure-prefix =/usr/local/libpng make install 4. install freetype wget http://download.savannah.nongnu.org/releases/freetype/freetype-2.3.4.tar.gz tar-zxf freetype-2.3.4.tar.gz cd freetype-2.3.4 mkdir-p/usr/local/freetype. /configure-prefix =/usr/local/freetype make install 5, install GD wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/gd-2.0.33.tar.gz tar-zxf gd-2.0 .33.tar.gz cd gd-2.0.33 mkdir-p/usr/local/gd2. /configure-prefix =/usr/local/gd2-with-jpeg =/usr/local/defaults 6/-with-png =/usr/local/lib/-with-zlib = /usr/local/lib/-with-freetype =/usr/local/freetype/make install ------------------ when jpg is installed, if an error occurs. Install the libtool libtool-1.X.tar.gz first // the version I downloaded./configure make install and then install the libraries src.v6b.tar.gz./configure -- enable-shared -- enable-static libraries. Otherwise, if other users require this package, they must specify its path. This may cause an error in checking host system type... Invalid configuration 'x86 _ 64-unknown-linux-gnu ': machine 'x86 _ 64-unknown' not recognized checking build system type... Invalid configuration 'x86 _ 64-unknown-linux-gnu ': machine 'x86 _ 64-unknown' not recognized configure: error: libtool configure failed or/libtool -- mode = compile gcc-O2-I. -c. /jcapimin. c make :. /libtool: make: *** [jcapimin. lo] Error 127. /libtool -- mode = compile gcc-O2-I. -c. /cjpeg. c make :. /libtool: make: *** [cjpeg. lo] Error 127 solution cp/usr/share/libtool/config. guess. cp/usr/share/libtool/config. sub. cp to the jpeg Installation File directory, pay attention to the following ". "make clean and try again. /configure -- prefix =/usr/local/libjpeg/-- enable-shared -- enable-static make install -------------------------------- If php has been installed, we recommend that you use the append compilation and Installation Method to go to the "[php extract Directory]/ext/gd" directory and execute the following command: [php installation directory]/bin/phpize Java code. /configure -- with-php-config = [php installation directory]/bin/php-config -- with-jpeg = [jpeg-6b installation directory] -- with-png = [libpng installation directory] -- with-freetype = [freetype installation directory] -- with-gettext = [gettext installation directory] -- with-gd = [gd installation directory] make install php installation directory]/lib/php/extensions/no-debug-non-zts-20060613 "directory to generate gd. so file, then cp [php installation directory]/lib/php/extensions/no-debug-non-zts-20060613/gd. so/opt/php/ext modify php. the INI file loads the gd component and adds extension_dir =/opt/php/ext and extension = gd. so, if you have extension_dir =/opt/php/ext, you do not need to add the Java code extension_dir =/opt/php/ext extension = gd. so author zlr

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.