Linux compile and install PHP various error large collection

Source: Internet
Author: User
Tags fpm gmp install openssl php error sapi snmp openldap

PHP Open Source scripting language

PHP (Foreign name: Hypertext Preprocessor, Chinese name: "Hypertext Preprocessor") is a common open source scripting language. Grammar absorbs the C language, Java and Perl features, the entry threshold is low, easy to learn, widely used, mainly for the field of web development. PHP has a file suffix called PHP.

This article summarizes some Linux compiled and installed PHP a variety of error large collection, interested students reference.

Error 1:make after error is as follows:

Generating phar.php/home/oldboy/tools/php-5.3.27/sapi/cli/php:error while loading shared libraries: Libmysqlclient.so.18:cannot open Shared object file:no such file or directorymake: * * * [ext/phar/phar.php] Error 127

Workaround:

[Email protected] php-5.3.27]# ln-s/application/mysql/lib/libmysqlclient.so.18/usr/lib64/[[email protected] php-5.3.27]# makegenerating Phar.pharchmod: Unable to access "Ext/phar/phar.phar": No file or directory make: [Ext/phar/phar.phar] Error 1 (ignored) Build complete. Don ' t forget to run ' make test '.

Make or error after:

[[Email protected] php-5.3.27]# CD Ext/phar/[[email protected] phar]# CP./phar.php./phar.phar[[email protected] php-5. 3.27]# Pwd/home/oldboy/tools/php-5.3.27[[email protected] php-5.3.27]# makebuild complete. Don ' t forget to run ' make test '.

Finally, no error.



nginx1.6.2-mysql5.5.32 binary, PHP installation Error Resolution:
[[email protected] php-5.3.27] #make
...
...
Generating phar.php
/home/oldboy/tools/php-5.3.27/sapi/cli/php:error while loading shared libraries:libmysqlclient.so.18:cannot open Shared object File:no such file or directory
Make: * * * [ext/phar/phar.php] Error 127
Error:
Resolution 1:
[[email protected] php-5.3.27]# Find/-name "libmysqlclient.so.18"
/home/oldboy/tools/mysql-5.5.32-linux2.6-x86_64/lib/libmysqlclient.so.18
/application/mysql-5.5.32/lib/libmysqlclient.so.18
[Email protected] php-5.3.27]# echo "/usr/local/lib" >>/etc/ld.so.conf
[Email protected] php-5.3.27]# echo "/application/mysql-5.5.32/lib" >>/etc/ld.so.conf
[Email protected] php-5.3.27]# tail-1/etc/ld.so.conf
/application/mysql-5.5.32/lib
[Email protected] php-5.3.27]# Ldconfig
[[email protected] php-5.3.27]# make
Generating Phar.phar
CHMOD: Unable to access "Ext/phar/phar.phar": No file or directory
Make: [Ext/phar/phar.phar] Error 1 (ignored)
Build complete.
Don ' t forget to run ' make test '.
Solution: mkdir ext/phar/phar.phar-p

problem: Make error
/home/oldboy/tools/php-5.3.27/sapi/cli/php:error while loading shared libraries:libmysqlclient.so.18:cannot Open Shared object File:no such file or directory
Make: * * * [ext/phar/phar.php] Error 127
Workaround:
ln-s/application/mysql/lib/libmysqlclient.so.18/usr/lib64/

Error:
/home/oldboy/tools/php-5.3.27/ext/xmlrpc/libxmlrpc/encodings.c:81:undefined reference to ' Libiconv '
/home/oldboy/tools/php-5.3.27/ext/xmlrpc/libxmlrpc/encodings.c:101:undefined reference to ' Libiconv_close '
Collect2:ld returned 1 exit status
Make: * * * [SAPI/FPM/PHP-FPM] Error 1
Workaround:
Make zend_extra_libs= '-liconv '


Fine Code Error
/libxmlrpc/encoding.c:101:undefined reference to ' Libiconv_close '
Collect2:ld returned 1 exit status
make:*** [SAPI/FPM/PHP-FPM] Error 1
Workaround:
#make zend_extra_libs= '-liconv '
error one, compiling PHP error
/php-5.3.2/ext/fileinfo/libmagic/apprentice.c:147:internal compiler Error:segmentation Fault
Please submit a full bug report,
With preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
The bug was not reproducible,so it was likely a hardware or OS problem.
make:*** [Ext/fileinfo/libmagic/apprentice.lo] Error 1
Workaround: Memory is more than 1G, this is a bug of php5.3.2

error Two, re-constructing configure file Error
./buildconf--force
Forcing buildconf
Buildconf:checking installation ...
buildconf:autoconf version 2.59 (OK)
Buildconf:your version of Autoconf likely contains buggy cache code.
Running Vcsclean for you.
To avoid This,install autoconf-2.13.
Can ' t figure out the your VCS, not cleaning.
Workaround: Compile and install autoconf-2.13
Then autoconf-2.13 the auotconf file to/usr/local/autoconf
--------------------------------------------------------------------
error three, missing library at compile time
CONFIGURE:ERROR:LIBXPM. (A|SO) not found.
Workaround: Yum Install Libxpm-devel
--------------------------------------------------------------------
error Four, missing gmp.h file at compile time
Configure:error:Unable to locate Gmp.h
Workaround: Yum Install Gmp-devel

--------------------------------------------------------------------
Error Five
Configure:error:xml2-config not found. Please check your LIBXML2 installation.
Workaround:
#yum Install LIBXML2 libxml2-devel (for Redhat & Fedora)
# Aptitude Install Libxml2-dev (for Ubuntu)
--------------------------------------------------------------------
Error Six
Checking for Pkg-config .../usr/bin/pkg-config
Configure:error:Cannot find OpenSSL ' s <evp.h>
Workaround:
#yum Install OpenSSL Openssl-devel
--------------------------------------------------------------------
Error Seven
Configure:error:Please Reinstall the BZIP2 distribution
Workaround:
# yum Install bzip2 Bzip2-devel
--------------------------------------------------------------------
Error Eight
Configure:error:Please Reinstall the Libcurl distribution-
Easy.h should is in <curl-dir>/include/curl/
Workaround:
# Yum Install Curl Curl-devel (for Redhat & Fedora)
# Install Libcurl4-gnutls-dev (for Ubuntu)
--------------------------------------------------------------------

Error Nine:
Configure:error:libjpeg. (also) not found.
Workaround:
# yum Install Libjpeg Libjpeg-devel
--------------------------------------------------------------------
Error 10
Configure:error:libpng. (also) not found.
--------------------------------------------------------------------
Workaround:
# yum Install libpng libpng-devel
--------------------------------------------------------------------
Error 11
Configure:error:freetype.h not found.
Workaround:
#yum Install Freetype-devel
--------------------------------------------------------------------
Error 12
Configure:error:Unable to locate Gmp.h
Workaround:
# yum Install Gmp-devel
--------------------------------------------------------------------
Error 13
Configure:error:Cannot find MySQL header files under/usr.
Note that the MySQL client library isn't bundled anymore!
Workaround:
# Yum Install Mysql-devel (for Redhat & Fedora)
# Apt-get Install Libmysql++-dev (for Ubuntu)
--------------------------------------------------------------------

Error 14
Configure:error:Please Reinstall the ncurses distribution
Workaround:
# yum Install ncurses Ncurses-devel
--------------------------------------------------------------------
Error 15
Checking for UnixODBC support ... configure:error:ODBC header file '/usr/include/sqlext.h ' not found!
Workaround:
# yum Install Unixodbc-devel
--------------------------------------------------------------------
Error 16
Configure:error:Cannot Find Pspell
Workaround:
# yum Install Pspell-devel
--------------------------------------------------------------------
Error 17
Configure:error:mcrypt.h not found. Please reinstall Libmcrypt.
Workaround:
# yum Install Libmcrypt libmcrypt-devel (for Redhat & Fedora)
# Apt-get Install Libmcrypt-dev
--------------------------------------------------------------------
Error 18
Configure:error:snmp.h not found. Check your SNMP installation.
Workaround:
# yum Install Net-snmp Net-snmp-devel
--------------------------------------------------------------------
Error 19
Configure:error:Cannot Find Ldap.h
Workaround:
#yum Install Openldap-devel OpenLDAP
Error 20
Configure:error:xslt-config not found. Please reinstall the LIBXSLT >= 1.1.0 distribution
Workaround:
#yum Install libxslt Libxslt-devel

Error 21
Checking for libevent >=1.4.11 install prefix ... configure:error:Could not find libevent >=1.4.11 in/usr/local/ph P
Workaround:
Install libevent-1.4.11 or above to/usr/local
Tar xzvf libevent-1.4.14-stable.tar.gz
CD libevent-1.4.14-stable
./configure--prefix=/usr/local
Make&&make Install
Add--with-libevent-dir=/usr/local when compiling./configure

Error 22

Cc1:out of memory allocating 2036 bytes after a total of 81846272 bytes
Make: * * * [Ext/date/lib/parse_date.lo] Error 1

Error:
/usr/bin/ld:cannot Find-lltdl
Collect2:ld returned 1 exit status
make:*** [SAPI/FPM/PHP-FPM] Error 1
Workaround:
Installing Ltdl
#cd: /libmcrypt-2.5.7/libltdl/
#./configure--enable-ltdl-install
#ldconfig
#cd php-5.3.6
#make zend_extra_libs= '-liconv '
Done S


Error 23:

Sometimes we compile PHP with the following error: Make ***[libphp5.la] Error 1 processing method: Install two RPM package #yum-y installation libtool.i386 #make Clean #make under Libtool-ltdl-devel.i386clean

650) this.width=650; "title=" 13.jpg "src=" https://s5.51cto.com/wyfs02/M00/A4/74/ Wkiol1mryzbattalaab0ab-z9by247.jpg "alt=" Wkiol1mryzbattalaab0ab-z9by247.jpg "/>


Http://www.phperz.com/article/14/1207/39774.html

This article is from the "Sandshell" blog, make sure to keep this source http://sandshell.blog.51cto.com/9055959/1962327

Linux compile and install PHP various error large collection

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.