我正在尝试在php5.5 amazon ec2服务器上安装php gd扩展 使用此命令
yum install php-gd
日志:
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:5.3.28-1.5.amzn1 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.28-1.5.amzn1 for package: php-gd-5.3.28-1.5.amzn1.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-5.3.28-1.5.amzn1.x86_64
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.3.28-1.5.amzn1.x86_64
--> Running transaction check
---> Package libXpm.x86_64 0:3.5.10-2.9.amzn1 will be installed
---> Package php-common.x86_64 0:5.3.28-1.5.amzn1 will be installed
---> Package t1lib.x86_64 0:5.1.2-6.5.amzn1 will be installed
--> Processing Conflict: php55-common-5.5.14-1.75.amzn1.x86_64 conflicts php-common < 5.5.14-1.75.amzn1
--> Finished Dependency Resolution
Error: php55-common conflicts with php-common-5.3.28-1.5.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
我试图这样做
sudo yum remove php-common
sudo yum install php55
但没有改变
答案 0 :(得分:6)
删除PHP 5.3:
sudo yum remove php-common
安装PHP5.5:
sudo yum install php55 php55-gd php55-mysqlnd php55-pdo
答案 1 :(得分:3)
我在安装gd库时遇到问题,我使用下面的代码解决了这个问题,我的php版本是5.6,这就是我编写php56-gd的原因。如果你的php版本是5,你可以使用&#34; yum install php5-gd&#34;
yum install php56-gd