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

Source: Internet
Author: User

1. Check whether the FreeType is installed
Rpm-qa | grep FreeType
No words compiled freetype here download
./configure--prefix=/usr/local/freetype

Make && make install, no flower head


2, check libjpeg install
Rpm-qa | grep libjpeg
No compile libjpeg download here
I did not install libjpeg, download good 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 directory
Make: * * [Install-lib] Error 1
Does the installer 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 the compilation is successful.


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


5, compile php here to download
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 complete
PS: If the installation has an error:
configure.ac:64:error:possibly undefined macro:am_iconv
    If This token and others is Legitima TE, please use M4_pattern_allow.
    See the Autoconf documentation.
Make: * * * [Configure] Error 1
needs to be installed gettext here to download
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.