各位好
第一次實作:在 AWS EC2 AMI 安裝 PHP redis,發生許多狀況,google 爬文許久,無法解決,請大家幫忙,謝謝!
預計的步驟如下 , 只實作 step 1 ~5 ,
step 1. # yum install php-devel
step 2. # wget https://github.com/nicolasff/phpredis/archive/master.zip
step 3. # unzip master.zip
step 4. # cd phpredis-master
step 5. # phpize
step 6. # ./configure
step 7. # make && make install
step 8. # vi /etc/php.ini 加 extension=redis.so
step 9. #sudo service httpd restart
問題1: 在 step 1. # yum install php-devel 最後面出現 :
....
Error: php55-cli conflicts with php-cli-5.3.29-1.8.amzn1.x86_64
Error: php70-cli conflicts with php-cli-5.3.29-1.8.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.34-1.16.amzn1.x86_64
Error: php70-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
Error: httpd24-tools conflicts with httpd-tools-2.2.34-1.16.amzn1.x86_64
Error: php55-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
Error: php70 conflicts with php-5.3.29-1.8.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
問題2: 在 step 5. # phpize 出現 :
[root@ip-000-00-00-00 phpredis-master]# phpize
Can't find PHP headers in /usr/include/php/5.5/php
The php-devel package is required for use of this command.
問題3: 步驟1的錯誤會影響步驟5嗎?
先謝謝各位的幫忙!
#php -v
PHP 5.5.38 (cli) (built: Oct 25 2016 18:30:32)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
10/3 補充
# find / -name phpize
/usr/bin/phpize
/etc/alternatives/phpize
https://www.asianmaterials.net/
謝謝您!
A. 步驟1的錯誤會影響步驟5嗎?
B. 之前環境設定,不知哪一環節出錯,
#php -v 與 phpinfo.php : PHP Version 7.0.33 不同
,會影響步驟5嗎?
Configuration File (php.ini) Path : /etc/php-7.0.conf:/etc
Loaded Configuration File : /etc/php.ini
Scan this dir for additional .ini files : /etc/php-7.0.d
謝謝您!
光看訊息好像你安裝了不只一個版本的 php
建議最好是把環境弄單純一點(只留一個版本)
再繼續往下安裝