centos源碼編譯php5 mcrypt模塊步驟詳解
步驟:
1.從php.net上面下載php5.3.x版本的源碼;
2.centos安裝相應(yīng)的擴(kuò)展包:
yum install libmcrypt libmcrypt-devel mcrypt mhash
下面的開發(fā)環(huán)境是為了編譯整個php源碼準(zhǔn)備的環(huán)境,此次編譯mcrypt擴(kuò)展不需要執(zhí)行.
yum install -y httpd-devel libtool-ltdl libtool-ltdl-devel openssl-devel curl-devel \
libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel \
libc-client libc-client-devel gd gd-devel libmcrypt libmcrypt-devel \
sqlite sqlite-devel mysql-devel libicu libicu-devel pcre-devel
3.確定phpize有安裝到服務(wù)器:
whereis phpize
確定php-config的位置:
whereis php-config
執(zhí)行:
./configure –with-php-config=/usr/bin/php-config
4.make錯誤:
mcrypt.c:283: error: ‘PHP_FE_END' undeclared here (not in a function)
解決方法:
sed -i 's|PHP_FE_END|{NULL,NULL,NULL}|' ./ext/**/*.c
make
如果是ZEND_MOD_END的錯誤,則執(zhí)行:
sed -i 's|ZEND_MOD_END|{NULL,NULL,NULL}|' ./ext/**/*.c
5.執(zhí)行下 make test,測試沒有問題.再執(zhí)行:
make install
6.增加文件: /etc/php.d/mcrypt.ini
; Enable mbstring extension module
extension=mcrypt.so
7.重啟web服務(wù)器,檢查php mcrypt是否安裝成功.
相關(guān)文章
Linux學(xué)習(xí)之CentOS(十三)--CentOS6.4下Mysql數(shù)據(jù)庫的安裝與配置的詳細(xì)方法
本篇文章主要介紹了Linux學(xué)習(xí)之CentOS(十三)--CentOS6.4下Mysql數(shù)據(jù)庫的安裝與配置,有需要的同學(xué)可以了解一下。2016-11-11
linux服務(wù)器上創(chuàng)建python虛擬環(huán)境過程
在Linux服務(wù)器上創(chuàng)建Python虛擬環(huán)境時,由于需要更高版本的Python(如3.10.0),首先確保openssl版本符合要求,如果openssl版本不足,需要升級,升級openssl后,設(shè)置環(huán)境變量,并在編譯安裝Python時指定openssl版本,最后,創(chuàng)建并激活Python虛擬環(huán)境2025-03-03

