linux - 请问CentOs 6.5升级到php5.5后如何打开GD扩展库?
PHPz
PHPz 2017-04-11 09:50:03
0
3
432

我用tp5做了一个项目,部署到了云服务器上【CentOs 6.5】,我安装lamp环境时yum获取的php是5.3的,因为框架需要,所以我就升级php内核到5.5.3,但是发现其缺少gd库,在低版本的php中只需在php.ini中打开extension = php_gd2就可以了,但是我发现在5.5中不行,于是我尝试安装gd库,可是我换了好几种方式也安装不了gd扩展,而且其缺少的依赖全是5.3的包,不知为何,请高手帮忙解决。

[root@VM_202_132_centos html]# yum install php-gd*
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * webtatic: us-east.repo.webtatic.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:5.3.3-48.el6_8 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-48.el6_8 for package: php-gd-5.3.3-48.el6_8.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.3.3-48.el6_8 will be installed
--> Processing Conflict: php55w-common-5.5.38-1.w6.x86_64 conflicts php-common < 5.5
--> Finished Dependency Resolution
Error: php55w-common conflicts with php-common-5.3.3-48.el6_8.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@VM_202_132_centos html]# 

PHPz
PHPz

学习是最好的投资!

全部回覆(3)
巴扎黑

这种问题就是版本不兼容导致的,你还是重装一下php吧

大家讲道理

重新安装 php5.5,不要忘记 gd
很难吗,还升级php ,你有才 !

PHPzhong

这边给你提供安装php5.6的yum方法扩展自选。
# rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

# yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof空格跟上自己想要的扩展
# yum --enablerepo=remi-php56 install php-gd php-mysql php-mbstring php-xml php-mcrypt忘记的扩展在运行一次就ok了

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!