设为首页 收藏本站
查看: 454|回复: 0

[经验分享] mcrypt pdo_mysql 等同类安装

[复制链接]
累计签到:2 天
连续签到:1 天
发表于 2016-3-25 08:29:16 | 显示全部楼层 |阅读模式
linux下安装插件 php 安装在/usrlocal/php5/bin/phpize下

[iyunv@ttl289 ~]# tar -zxf php-5.2.4.tar.gz
[iyunv@ttl289 ~]# cd php-5.2.4/ext/mcrypt/
[iyunv@ttl289 mcrypt]# /usr/local/php5/bin/phpize #创建configure文件
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script. #这边出错,显示找不到autoconf文件

[iyunv@ttl289 mcrypt]# yum install autoconf #运行安装autoconf
[iyunv@ttl289 mcrypt]# /usr/local/php5/bin/phpize #再次执行 ,正常。
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
[iyunv@ttl289 mcrypt]# ./configure --with-mcrypt --with-php-config=/usr/local/php5/bin/php-config
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details. #安装出错,没有gcc编译工具。
[iyunv@ttl289 mcrypt]# rpm -qa |grep gcc
libgcc-4.1.2-14.el5
[iyunv@ttl289 gcc]# yum install gcc

[iyunv@ttl289 mcrypt]# ./configure --with-mcrypt --with-php-config=/usr/local/php5/bin/php-config #编译 需要注意的是php-config文件的位置
configure: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for mcrypt support... yes, shared
configure: error: mcrypt.h not found. Please reinstall libmcrypt. #有报错,需要安装libmcrypt-devle
[iyunv@ttl289 mcrypt]# yum install libmcrypt
[iyunv@ttl289 mcrypt]# yum install libmcrypt-devel
[iyunv@ttl289 mcrypt]# ./configure --with-mcrypt --with-php-config=/usr/local/php5/bin/php-config #再次编译
[iyunv@ttl289 mcrypt]# make
[iyunv@ttl289 mcrypt]# make install
Installing shared extensions: /usr/local/php5/lib/php/ #安装成功

注意:需要在php.ini 文件里面添加 extension=mcrypt.so
[iyunv@ttl289 mcrypt]/usr/local/php5/bin/php -m |grep mcrypt
[PHP Modules]
mcrypt

现在自此完成安装

附加::

当执行make 时大致出现一下报错:

在安装pdo_mysql时,当执行make test 报如下错误时:安装php是 碰到一个错误configure: error: Try adding --with-zlib-dir=<DIR>.然后提示查看configure.log

错误原因显示如下
/usr/bin/ld: cannot find -lmysqlclient

则说明没有安装mysql-devel或MySQL-devel-community,安装即可。。。。。。。。。。

当make完之后未报错,进行make test时,如下如下错误:

Running selected tests.
SKIP PDO MySQL Bug #33689 [tests/bug_33689.phpt] reason: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
<br />/6 [tests/common.phpt]
<b>Warning</b>: opendir(ext/pdo/tests) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: No such file or directory in <b>/var/backup/zzz/php-5.1.6/ext/pdo_mysql/run-tests.php</b> on line <b>575</b><br />
ERROR: cannot open directory: ext/pdo/tests
make: [test] Error 1 (ignored)

(/var/backup/zzz/php-5.1.6/ext/pdo_mysql/ 是你当前安装的目录)

不予理睬,直接执行make install



运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-195292-1-1.html 上篇帖子: MySQL的增删改查 下篇帖子: MySQL学习笔记之八:使用Xtrabackup进行MySQL热备
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表