yum安装yum install php54ww出错,实现是解决不了,搞了几个小时了,大侠,求助

在CentOS/RHEL 6.2上使用YUM安装PHP5.4_服务器应用_Linux公社-Linux系统门户网站
你好,游客
在CentOS/RHEL 6.2上使用YUM安装PHP5.4
来源:Linux社区&
作者:叶文涛
本文适用于所有6及 Enterprise Linux6版本上安装php5.4,本人测试安装环境为32位CentOS6系统。
文章来源:PHP 5.4 on CentOS/RHEL 6.2 via Yum&/packages/php54/
php5.4于号发布,从php5.4.0开始php加入了一些新特色如:
Traits支持
内置了一个简单的Web服务器
提供了数组简短语法
直接对函数返回值进行数组取值
最终删除魔术方法及安全模式
你可以在这里看到更新日志。
这里使用&Webtatic EL6的YUM源来安装php5.4,我们首页安装Webtatic EL6 YUM源
rpm&-Uvh&/yum/el6/latest.rpm&&
安装php5.4
yum&install&php54w&&如果安装失败,建议您先卸载以前的php再进行安装,使用yum remove php php-*
附带的php扩展列表:
php54w-bcmath
php54w-cli
php-cgi, php-pcntl, php-readline
php54w-common
php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml, php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib
php54w-dba
php54w-devel
php54w-embedded
php-embedded-devel
php54w-enchant
php54w-fpm
php54w-imap
php54w-interbase
php_database, php-firebird
php54w-intl
php54w-ldap
php54w-mbstring
php54w-mcrypt
php54w-mssql
php54w-mysql
php-mysqli, php_database
php54w-odbc
php-pdo_odbc, php_database
php54w-pdo
php54w-pgsql
php-pdo_pgsql, php_database
php54w-process
php-posix, php-sysvmsg, php-sysvsem, php-sysvshm
php54w-pspell
php54w-recode
php54w-snmp
php54w-soap
php54w-tidy
php54w-xml
php-dom, php-domxml, php-wddx, php-xsl
php54w-xmlrpc
php54w-zts
鉴于目前Webtatic对php5.3提供的扩展也就这么多,php5.4也就提供这些。&其它扩展像&opcode caches目前还没有出来,但是Webtatic会努力的尽快公布出来。
最新版本中的error_reporting 中E_ALL 现在包含了 E_STRICT,会出现更多的警告及错误提示。默认情况下error_reporting是关闭状态,但是如果是从旧的php版本中升级而来,php.ini可能得不到更新,error_reporting可能开启着。
关于php5.4在centos5上的安装升级
因为centos已经过去的版本了,用的越来越少,把php5.4移植到centos5上也需要大量的工作,估计够呛能完成啊。
相关资讯 & & &
& (02/07/:47)
& (02/04/:42)
& (01/20/:29)
& (02/04/:15)
& (02/04/:06)
& (01/02/:02)
   同意评论声明
   发表
尊重网上道德,遵守中华人民共和国的各项有关法律法规
承担一切因您的行为而直接或间接导致的民事或刑事法律责任
本站管理人员有权保留或删除其管辖留言中的任意内容
本站有权在网站内转载或引用您的评论
参与本评论即表明您已经阅读并接受上述条款编译安装PHP 时遇到问题解决方法. - z-ping - 博客园
环境: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
运行之后遇到的问题:
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
checking for pkg-config... /usr/bin/pkg-configconfigure: error: Cannot find OpenSSL's &evp.h&
这是ssl没装
&yum& install& openssl.x86_64 openssl-devel.x86_64 -y
checking for BZip2 in default path... not foundconfigure: error: Please reinstall the BZip2 distribution
这是bzip2软件包没有安装
yum install bzip2-devel.x86_64 -y
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
checking whether to enable JIS-mapped Japanese font support in GD... nochecking for fabsf... yeschecking for floorf... yesconfigure: error: jpeglib.h not found
GD库没有安装
yum install libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 -y
checking for stdarg.h... (cached) yeschecking for mcrypt support... yesconfigure: 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&
PS:不知道美国那边的源是不是好一些 很多的包 在中国需要手动下载 &在美国的服务器上 能直接用yum.......
阅读(...) 评论()PHP(外文名: Hypertext Preprocessor,中文名:“超文本预处理器”)是一种通用开源脚本语言。语法吸收了C语言、Java和Perl的特点,入门门槛较低,易于学习,使用广泛,主要适用于Web开发领域。PHP的文件后缀名为php。
本文为大家整理汇总了一些linux下编译安装php各种报错大集合 ,感兴趣的同学参考下。
nginx1.6.2-mysql5.5.32二进制,php安装报错解决:
[root@client 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] 错误 127
[root@client 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
[root@client php-5.3.27]# echo &/usr/local/lib& &&/etc/ld.so.conf
[root@client php-5.3.27]# echo &/application/mysql-5.5.32/lib& &&/etc/ld.so.conf& &
[root@client php-5.3.27]# tail -1 /etc/ld.so.conf
/application/mysql-5.5.32/lib
[root@client php-5.3.27]# ldconfig
[root@client php-5.3.27]# make
Generating phar.phar
chmod: 无法访问&ext/phar/phar.phar&: 没有那个文件或目录
make: [ext/phar/phar.phar] 错误 1 (忽略)
Build complete.
Don't forget to run 'make test'.
解决:mkdir ext/phar/phar.phar -p
问题:make报错
/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] 错误 127
解决办法:
ln -s /application/mysql/lib/libmysqlclient.so.18& /usr/lib64/
/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
解决办法:
make ZEND_EXTRA_LIBS='-liconv'
/libxmlrpc/encoding.c:101:undefined reference to 'libiconv_close'
collect2: ld returned 1 exit status
make:*** [sapi/fpm/php-fpm] Error 1
解决方法:
#make ZEND_EXTRA_LIBS='-liconv'
错误一、编译php出错
/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:/bugzilla& for instructions.
The bug is not reproducible,so it is likely a hardware or OS problem.
make:*** [ext/fileinfo/libmagic/apprentice.lo] Error 1
解决方法:内存大于1G即可,这是php5.3.2的一个bug
错误二、重新构造configure文件出错
./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 your VCS, not cleaning.
解决方法:编译安装autoconf-2.13
&& && 再将autoconf-2.13的auotconf文件至/usr/local/autoconf
--------------------------------------------------------------------
错误三、编译时缺少库
configure: error: libXpm.(a|so) not found.
解决方法:yum install libXpm-devel
--------------------------------------------------------------------
错误四、编译时缺少gmp.h文件
configure: error: Unable to locate gmp.h
解决方法:yum install gmp-devel
--------------------------------------------------------------------
Configure: error: xml2-config not found. Please check your libxml2 installation.
#yum install libxml2 libxml2-devel (For Redhat & Fedora)
# aptitude install libxml2-dev&&&&& (For ubuntu)
--------------------------------------------------------------------
Checking for pkg-config& /usr/bin/pkg-config
configure: error: Cannot find OpenSSL&s &evp.h&
解决方法:
#yum install openssl openssl-devel
--------------------------------------------------------------------
Configure: error: Please reinstall the BZip2 distribution
解决方法:
# yum install bzip2 bzip2-devel
--------------------------------------------------------------------
Configure: error: Please reinstall the libcurl distribution -
easy.h should be in &curl-dir&/include/curl/
解决方法:
# yum install curl curl-devel&& (For Redhat & Fedora)
# install libcurl4-gnutls-dev&&& (For Ubuntu)
--------------------------------------------------------------------
Configure: error: libjpeg.(also) not found.
解决方法:
# yum install libjpeg libjpeg-devel
--------------------------------------------------------------------
Configure: error: libpng.(also) not found.
--------------------------------------------------------------------
解决方法:
# yum install libpng libpng-devel
--------------------------------------------------------------------
Configure: error: freetype.h not found.
解决方法:
#yum install freetype-devel
--------------------------------------------------------------------
Configure: error: Unable to locate gmp.h
解决方法:
# yum install gmp-devel
--------------------------------------------------------------------
Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
解决方法:
# yum install mysql-devel&&&&&&&&&&& (For Redhat & Fedora)
# apt-get install libmysql++-dev&&&&& (For Ubuntu)
--------------------------------------------------------------------
Configure: error: Please reinstall the ncurses distribution
解决方法:
# yum install ncurses ncurses-devel
--------------------------------------------------------------------
Checking for unixODBC support& configure: error: ODBC header file &/usr/include/sqlext.h& not found!
解决方法:
# yum install unixODBC-devel
--------------------------------------------------------------------
Configure: error: Cannot find pspell
解决方法:
# yum install pspell-devel
--------------------------------------------------------------------
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决方法:
# yum install libmcrypt libmcrypt-devel&&& (For Redhat & Fedora)
# apt-get install libmcrypt-dev
--------------------------------------------------------------------
Configure: error: snmp.h not found. Check your SNMP installation.
解决方法:
# yum install net-snmp net-snmp-devel
--------------------------------------------------------------------
configure:error:Cannot find ldap.h
解决方法:
#yum install openldap-devel openldap
configure:error:xslt-config not found. Please reinstall the libxslt &= 1.1.0 distribution
解决方法:
#yum install libxslt libxslt-devel
错误二十一
checking for libevent &=1.4.11 install prefix... configure: error: Could not find libevent &=1.4.11 in /usr/local/php
安装libevent-1.4.11以上版本至/usr/local
tar xzvf libevent-1.4.14-stable.tar.gz
cd libevent-1.4.14-stable
./configure --prefix=/usr/local
make&&make install
在编译./configure时添加--with-libevent-dir=/usr/local即可
错误二十二
cc1: out of memory allocating 2036 bytes after a total of
make: *** [ext/date/lib/parse_date.lo] Error 1
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make:*** [sapi/fpm/php-fpm] Error 1
解决方法:
#cd ../libmcrypt-2.5.7/libltdl/
#./configure --enable-ltdl-install
#cd php-5.3.6
#make ZEND_EXTRA_LIBS='-liconv'
Copyright &
All Rights Reserved &&&&&&yum安装php54w出错,实现是解决不了,搞了几个小时了,大侠,求助 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
已注册用户请 &
Distributions
中文资源站
Sponsored by
国内领先的实时通信云为开发者和企业提供安全可靠的场景化实时通信云服务
Promoted by
yum安装php54w出错,实现是解决不了,搞了几个小时了,大侠,求助
13:34:57 +08:00 · 2269 次点击
问题:======================使用指令:$ yum install -y php54w出错:Error: Package: php54w-common-5.4.23-1.w5.x86_64 (webtatic-el5)
Requires: libcurl.so.3()(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest======================就是无法安装libcurl.so.3======================使用的repo是:rpm -Uvh 没有其他的repo,只有一个centos base 一个webtaticCenos 版本:CentOS release 6.5 (Final)======================求助:是否可以提供一个可以下载libcurl.so.3的repo;或者,大家在centos上安装php5.4版本如何安装?我看了大量的解决的帖子,大部分只要disable个repo就解决了,但是我根本就没使用那些repos;大侠,求助。。。
3 回复 &| &直到
08:00:00 +08:00
& & 14:22:11 +08:00
yum --enablerepo=remi install php php-fpm
& & 15:01:25 +08:00
按你的方法解决了。。
看来我还是Too young too simple, sometimes naive.
& & 15:04:19 +08:00
还需要安装
& · & 1924 人在线 & 最高记录 2399 & · &
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.7.5 · 54ms · UTC 08:04 · PVG 16:04 · LAX 00:04 · JFK 03:04? Do have faith in what you're doing.}

我要回帖

更多关于 yum出错 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信