Linux under compilation GD (Freetype+libjpeg+libpng+gd-devel)

Source: Internet
Author: User
Tags php download

Linux under compilation GD (Freetype+libjpeg+libpng+gd-devel)

1. Check whether the FreeType is installed
Rpm-qa | grep FreeType
No words compiled freetype here download
Https://www.freetype.org/download.html
http://download.savannah.gnu.org/releases/freetype/

./configure--prefix=/usr/local/freetype
Make && make install, no flower head

2. Check if Libjpeg is installed
Rpm-qa | grep libjpeg
No compile libjpeg download here
I didn't install libjpeg, download and start compiling
jpegsrc.v6b.tar.gz
TAR-XZVF jpegsrc.v6b.tar.gz
CD jpeg-6b/
./configure--prefix=/usr/local/jpeg--enable-shared
Make & & make install
last step make install error:
/usr/bin/install-c-M 644 jconfig.h/usr/local/jpeg/include/jconfig.h
/usr/bin/install:cannot Create regular file '/usr/local/jpeg/include/jconfig.h ': No such file or directory
Make: [Install-headers] Error 1
/usr/bin/install:cannot Create regular file '/usr/local/jpeg/lib/libjpeg.so.62.0.0 ': No such file or directory
/usr/bin/install:cannot create regular file '/usr/local/jpeg/bin/cjpeg ': No such file or dir Ectory
Make: * * * [install-lib] Error 1
Is it not possible for the installer to create a new directory by itself?? Halo, I'll go. New directory
Mkdir-p/usr/local/jpeg/include
mkdir-p/usr/local/jpeg/lib
mkdir-p/usr/local/jpeg/bin
Mkdir-p/usr/local/jpeg/man/man1
OK and then compile it successfully.

3, check whether the installation of libpng
Rpm-qa libpng
No words compiled libpng here download
./configure--prefix=/usr/local/png
Make && make install

4, install the GD library here to download
TAR-ZXVF gd-2.0.35.tar.gz
CD gd-2.0.35
./configure--PREFIX=/USR/LOCAL/GD2--with-freetype-dir=/usr/local/freetype

5. Compile php download here
TAR-ZXVF php-5.2.5.tar.gz
CD php-5.2.5
./configure--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql--with-zlib--with-jpeg-dir=/usr/local/jpeg-- With-png-dir=/usr/local/png--with-freetype-dir=/usr/local/freetype--enable-ftp--enable-sockets--with-gd=/usr/ LOCAL/GD2--enable-gd-native-ttf--with-ttf--enable-magic-quotes--with-iconv-enable-mbstring=all
OK all done
PS: If the installation has an error:
configure.ac:64:error:possibly undefined Macro:am_iconv
If this token and others is legitimate, please use M4_pattern_allow.
See the Autoconf documentation.
Make: * * * [Configure] Error 1
Need to install gettext here to download

Compiling GD (freetype+libjpeg+libpng+gd-devel) under Linux

Related Article

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.