PHP Initial Notes

Source: Internet
Author: User
Tags gmp install openssl ldap snmp openldap
PHP Small Note

From?http://hi.baidu.com/wang01ning/blog/item/6076e2ee2f3be4e3cf1b3e16.html

?

Although the installation of PHP is sometimes very simple, but if the application of a lot, we installed a headache! The common is that the PHP plugin installs the most problems!

?????? In fact, whether you are Apache application or Nginx class. PHP installation is not very simple, although many configure on the Web, but that is not necessarily suitable for you, because a lot of directly related to your system and system version and kernel. Let's get down to the chase.

??? First, one of the most common is configure:error:libjpeg. (A|SO) not found

?? A lot of people are wondering, I have installed, why can not find it? can not find the fact that the examination of its search location is not, otherwise it will not say not found

??? The reason is that most of our software is just Rpm-qa | grep * * *

???? Then there are two duplicate software

[[Email protected]_server php-5.2.13]# Rpm-qa | grep jpeg
Libjpeg-6b-33
Libjpeg-6b-33
Libjpeg-devel-6b-33

Both 32-and 64-bit are loaded. You can force the removal of two packages and reload the 64-bit package. RPM--allmatches--nodeps This method is really damaging the system and hurting you. Sometimes the enforcement of the things will be random to the Lib some of the package to be forced to delete. So I think it is not recommended to do so, repeat let it repeat it, no matter!

??? To solve the problem is that it did not find, I installed, then I have to look to see if it was put there.

[Email protected]_server php-5.2.13]# updatedb
[Email protected]_server php-5.2.13]# Locate libjpeg.so
/usr/lib64/libjpeg.so.62
/usr/lib64/libjpeg.so.62.0.0
/usr/lib64/libjpeg.so
/usr/lib/libjpeg.so
[Email protected]_server php-5.2.13]# Locate libjpeg.a
/usr/lib64/libjpeg.a
/data0/software/jpeg-6b/libjpeg.a
[[Email Protected]_server php-5.2.13]#

When we compile, we often see a library of files, the general is to *.a,*.so and other names, try to search search, not fuzzy search!

Through the above search actually know some reasons, configure general search compiled path is/usr/lib/, because PHP by default in/usr/lib/to find the relevant library file, and x64 machine is on:/usr/ Lib64. Then you can directly copy the required library files from the/usr/lib64 to the/usr/lib/.

Then remember to execute the following command before configure:

cp-frp/usr/lib64/libjpeg.*/usr/lib/

Usr/bin/install:cannot Create regular file '/usr/local/man/man1/cjpeg.1 ': No such file or directory
Make: * * * [install] Error 1
You are prompted to find the directory. Since the computer cannot be found, we can find the human brain, we first create first
Mkdir/usr/local/man
Mkdir/usr/local/man1??? When you're done, come back.
Make install??? (Success without error)

Configure:error:libjpng. (A|SO) not found

In fact, the same as just now.

cp-frp/usr/lib64/libpng*/usr/lib/

Configure:error:Cannot Find LDAP Libraries in/usr/lib.

cp-frp/usr/lib64/libldap*/usr/lib/

Similar errors are many, methods are also many, we have to be flexible, specific problems specific analysis!

There are also some common configure error lists for reference:

Configure:error:No Curses/termcap Library found
Some of the online statements are:
--with-named-curses-libs=/usr/lib/libncursesw.so.5
Actually is wrong, although can solve the configure error, but make the time will prompt the error, the correct practice should be
Yum-y Install Ncurses-devel
Debian:apt-get Install Libncurses5-dev

Configure:error:xml2-config not found
Yum-y Install Libxml2-devel
Debian:apt-get Install Libxml2-dev

Configure:error:Cannot Find OpenSSL ' s
Yum-y Install Openssl-devel

Configure:error:libjpeg. (A|SO) not found
Yum-y Install GD
Yum-y Install Gd-devel
Debian:apt-get Install Libjpeg-dev

Configure:error:libpng. (A|SO) not found.
Apt-get Install Libpng12-dev

Configure:error:cannot find output from Lex; Giving up
Yum-y Install Flex

Configure:error:mod_deflate have been requested but can is built due to prerequisite failures
Yum-y Install Zlib-devel Openssl-devel
Debian:apt-get Install Zlib1g-dev

CONFIGURE:ERROR:LIBXPM. (A|SO) not found.
Apt-get Install Libxpm-dev

Onfigure:error:freetype.h not found.
Apt-get Install Libfreetype6-dev

Configure:error: ... No recognized SSL/TLS toolkit detected
Apt-get Install Libssl-dev

1) configure:error:xml2-config not found. Please check your LIBXML2 installation.

Solutions:
Yum install libxml2 libxml2-devel (for Redhat & Fedora)

# Aptitude Install Libxml2-dev (for Ubuntu)

2) Checking for pkg-config .../usr/bin/pkg-config
Configure:error:Cannot Find OpenSSL ' s

Solutions:

Yum Install OpenSSL Openssl-devel

3) Configure:error:Please Reinstall the BZIP2 distribution

Solutions:
Yum Install bzip2 Bzip2-devel

4) Configure:error:Please Reinstall the Libcurl distribution-
Easy.h should be in/include/curl/

Solutions:
Yum Install Curl Curl-devel (for Redhat & Fedora)

# Install Libcurl4-gnutls-dev (for Ubuntu)

5) Configure:error:libjpeg. (also) not found.

Solutions:
Yum-y Install GD
Yum-y Install Gd-devel
Yum Install Libjpeg Libjpeg-devel

6) Configure:error:libpng. (also) not found.

Solutions:
Yum Install libpng Libpng-devel
Apt-get Install Libpng12-dev

7) configure:error:freetype.h not found.
Solutions:
Yum Install Freetype-devel

Configure:error:Unable to locate Gmp.h

Solutions:
Yum Install Gmp-devel

9) Configure:error:Cannot Find MySQL header files under/usr.
Note that the MySQL client library isn't bundled anymore!

Solutions:
Yum install Mysql-devel (for Redhat & Fedora)

# Apt-get Install Libmysql++-dev (for Ubuntu)

Ten) Configure:error:Please Reinstall the ncurses distribution

Solutions:
Yum Install ncurses Ncurses-devel

One) Checking for UnixODBC support ... configure:error:ODBC header file '/usr/include/sqlext.h ' not found!

Solutions:
Yum Install Unixodbc-devel

Configure:error:Cannot Find Pspell

Solutions:
Yum Install Pspell-devel

Configure:error:mcrypt.h not found. Please reinstall Libmcrypt.

Solutions:
Yum Install Libmcrypt libmcrypt-devel (for Redhat & Fedora)

# Apt-get Install Libmcrypt-dev

) Configure:error:snmp.h not found. Check your SNMP installation.

Solutions:

Yum Install Net-snmp Net-snmp-devel

15) Opening the LDAP Service also requires
Yum-y Install Openldap-devel openldap-servers openldap-clients

Configure:error:No Curses/termcap Library found
Some of the online statements are:
–with-named-curses-libs=/usr/lib/libncursesw.so.5
Actually is wrong, although can solve the configure error, but make the time will prompt the error, the correct practice should be
Yum-y Install Ncurses-devel (for Redhat)
Apt-get install Libncurses5-dev (for Debian)

Configure:error:cannot find output from Lex; Giving up
Yum-y Install Flex

Configure:error:mod_deflate have been requested but can is not being built due to prerequisite failures
Yum-y Install Zlib-devel Openssl-devel
Debian:apt-get Install Zlib1g-dev

) configure:error:libXpm. (A|SO) not found.
Apt-get Install Libxpm-dev

?

  • 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.