http://www.cnblogs.com/kristain/articles/3809243.html

 

 

借鉴php安装错误 2013-01-04 19:16:49

分类: 系统运维

环境:centos X64 最小化安装

php版本:php-5.4.3

安装前.先安装些软件和库文件

yum install -y gcc gcc-c++  make zlib zlib-devel pcre pcre-devel  libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers

领导要我们自己手动装 不允许我们直接用yum 所以上面的都没执行

编译安装PHP

进入php的解压目录

./configure --prefix=/usr/local/php --enable-fpm  --with-mcrypt=/usr/local/libmcrypt --with-zlib --enable-mbstring --with-openssl --with-mysql --with-mysqli --with-mysql-sock --with-gd --with-jpeg-dir=/usr/lib --enable-gd-native-ttf  --enable-pdo --with-pdo-mysql --with-gettext --with-curl --with-pdo-mysql --enable-sockets --enable-bcmath --enable-xml --with-bz2 --enable-zip --enable-freetype

运行之后遇到的问题:

error 1

checking for xml2-config path... 
configure: error: xml2-config not found. Please check your libxml2 installation.

(看提示就明白 是一个lib库没装  先用 yum search 名字 看是否能搜到名字 ,找到名字后 把软件包 开发包装上)

解决办法

yum install libxml2-devel.x86_64

error 2

checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's <evp.h>

这是ssl没装

解决办法

 yum  install  openssl.x86_64 openssl-devel.x86_64 -y

error 3

checking for BZip2 in default path... not found
configure: error: Please reinstall the BZip2 distribution

这是bzip2软件包没有安装

解决办法

yum install bzip2-devel.x86_64 -y

error 4

configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/

curl和curl库文件没有安装

解决办法

yum install libcurl.x86_64 libcurl-devel.x86_64 -y

error 5

checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
configure: error: jpeglib.h not found

yum install -y libjpeg-devel

error 6

checking for stdarg.h... (cached) yes
checking for mcrypt support... yes
configure: error: mcrypt.h not found. Please reinstall libmcrypt.

libmcrypt库没有安装 ,要是不能用yun安装的话  就要去下载个gz包 自己编译安装

(编译安装  ./configure --piefix=/usr/local/libmcrypt   make && make install)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

要是错误里面含有mysql的  那是mysql-devel 没有安装

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

出现

Generating files configure: creating ./config.status creating main/internal_functions.c creating main/internal_functions_cli.c

+--------------------------------------------------------------------+

| License:                                                           |

| This software is subject to the PHP License, available in this     |

| distribution in the file LICENSE.  By continuing this installation |

| process, you are bound by the terms of this license agreement.     |

| If you do not agree with the terms of this license, you must abort |

| the installation process at this point.                            |

+--------------------------------------------------------------------+

Thank you for using PHP.

config.status: creating php5.spec

config.status: creating main/build-defs.h

config.status: creating scripts/phpize

config.status: creating scripts/man1/phpize.1

config.status: creating scripts/php-config

config.status: creating scripts/man1/php-config.1

config.status: creating sapi/cli/php.1

config.status: creating sapi/fpm/php-fpm.conf

config.status: creating sapi/fpm/init.d.php-fpm

config.status: creating sapi/fpm/php-fpm.8

config.status: creating sapi/fpm/status.html

config.status: creating main/php_config.h

config.status: executing default commands

表示安装成功

make  && make install

make完成之后  到php的解压目录 找出php.ini-production 复制到 /usr/local/php/lib/ 下 文件名改成php.ini

cp php.ini-production /usr/local/php/lib/php.ini

完成..

 

PHP configure: error: mcrypt.h not found. Please reinstall libmcrypt.

今天在编译php的时候,出现如下错误php安装出错:configure: error: mcrypt.h not found. Please reinstall libmcrypt.,意思是,没有查找到mcrytp.h,需要安装libcrytp,在下面的地址下载libmarypt:
wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz

安装:
tar -zxvf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure
make
make install
然后再安装PHP

rpm -ivh  http://www.aminglinux.com/bbs/data/attachment/forum/month_1211/epel-release-6-7.noarch.rpm

yum install -y  libmcrypt-devel

php安装中的错误的更多相关文章

  1. python 安装中的错误解决

    最近使用python3.5,其中遇到安装中的错误,现在记录下来,提个醒 1 安装setuptools 出现缺少 zlib模块 解决: 1 yum install zlib 2 yum install ...

  2. mysql安装过程中出现错误ERROR 1820 (HY000): You must SET PASSWORD before executing this statement解决

    mysql安装过程中出现错误ERROR 1820 (HY000): You must SET PASSWORD before executing this statement解决   最近新装好的my ...

  3. 无法安装Java,以下开关中存在错误:“0”

    无法安装Java,以下开关中存在错误:“0”:. 解决方法:以管理员运行

  4. Windows安装Ubuntu桌面操作系统到移动硬盘中以及错误解决

    用到的工具:U盘一个(usb3.0,你懂的),移动硬盘(我这个是笔记本里面取出来的机械硬盘装上的盒子) 第一步:下载Ubuntu系统iso镜像文件 下载Ubuntu系统iso镜像文件,由于我是新手,下 ...

  5. android studio安装中出现Failed to install Intel HAXM错误的解决方法

    1.问题分析 从下面可以知道安装Intel HAXM失败,请检查haxm_silent_run.log这篇日志. (1)先了解一下什么是Intel HAXM Intel代表的是英特尔,HAXM的全程是 ...

  6. 【转】SQL Server -- 已成功与服务器建立连接,但是在登录过程中发生错误

    SQL Server -- 已成功与服务器建立连接,但是在登录过程中发生错误 最近在VS2013上连接远程数据库时,突然连接不上,在跑MSTest下跑的时候,QTAgent32 crash.换成IIS ...

  7. windows 2012 r2下安装sharepoint 2013错误解决

    日前,我在安装sharepoint 2013时,需要预部署一些软件,我们知道运行产品准备工具“prerequisiteinstaller”后就可以自动下载安装配置这些软件,但是使用系统为windows ...

  8. coreseek安装遇到的错误

    coreseek安装遇到的错误 1.问题: wtm@wtm-OEM:/usr/local/coreseek/etc$ /usr/local/coreseek/bin/indexer --all Cor ...

  9. 已成功与服务器建立连接,但是在登录过程中发生错误。 (provider: SSL Provider, error: 0 - 接收到的消息异常,或格式不正确。)

    之前做好的asp.net部署后,发现 访问数据库时: 异常:已捕获: "已成功与服务器建立连接,但是在登录过程中发生错误. (provider: SSL Provider, error: 0 ...

随机推荐

  1. Linux中find、grep命令详细用法

    在linux下面工作,有些命令能够大大提高效率.本文就向大家介绍find.grep命令,他哥俩可以算是必会的linux命令,我几乎每天都要用到他们.本文结构如下: find命令 find命令的一般形式 ...

  2. A Tour of Go For is Go's "while"

    At that point you can drop the semicolons(分号): C's while is spelled for in Go. package main import & ...

  3. python 实战

    用Python写一个真正的Web App! 目标 我们设定的实战目标是一个Blog网站,包含日志.用户和评论3大部分. 比如webpy.org上就提供了一个Blog的例子,目测也就100行代码. 我们 ...

  4. java初学的几个问题

    1. 请问配置JDK时环境变量path和JAVA_HOME的作用是什么? 作用:告诉操作系统编译器运行的路径和生成的类路径.这样java源程序才可以进行编译和运行. 以下4-7题请在JDK环境下编译和 ...

  5. twitter的snowflake算法(C#版本)

    转自:http://blog.csdn.net/kinwyb/article/details/50238505 使用twitter的snowflake算法生成唯一ID. 在分布式系统中,需要生成全局U ...

  6. 转换流--OutputStreamWriter类与InputStreamReader类

    12.4  转换流--OutputStreamWriter类与InputStreamReader类 整个IO包实际上分为字节流和字符流,可是除了这两个流之外,还存在一组字节流-字符流的转换类. Out ...

  7. cardslib

    https://github.com/gabrielemariotti/cardslib

  8. linux中shell变量$#,$@,$0,$1,$2的含义解释

    linux中shell变量$#,$@,$0,$1,$2的含义解释 linux中shell变量$#,$@,$0,$1,$2的含义解释:  变量说明:  $$  Shell本身的PID(ProcessID ...

  9. [Javascript] Drawing Paths - Lines and Rectangles

    <!DOCTYPE html> <html> <head> <meta name="description" content=" ...

  10. 标准I/O库之标准输入、标准输出和标准出错

    对一个进程预定义了三个流,并且这三个流可以自动地被进程使用,它们是:标准输入.标准输出和标注出错.这些流引用的文件与文件描述符STDIN_FILENO.STDOUT_FILENO和STDERR_FIL ...