duanfan1965 2016-04-05 23:35
浏览 214
已采纳

无法在centos上安装带有yum的php-gd和freetype

I'm unable to install GD and Freetype for PHP on centos.

I've read many similar questions like this one Install GD library and freetype on Linux But I'm still having no luck..

    [root@media modules]# sudo yum install php-gd
    Loaded plugins: fastestmirror, priorities, replace, security
    Setting up Install Process
    Loading mirror speeds from cached hostfile
     * base: mirror.overthewire.com.au
     * extras: mirror.nsw.coloau.com.au
     * ius: ius.mirror.digitalpacific.com.au
     * remi-php56: mirror.innosol.asia
     * rpmforge: mirror.ventraip.net.au
     * updates: mirror.overthewire.com.au
    Resolving Dependencies
    --> Running transaction check
    ---> Package php-gd.x86_64 0:5.6.20-1.el6.remi will be installed
    --> Processing Dependency: gd-last(x86-64) >= 2.1.1 for package: php-gd-5.6.20-1.el6.remi.x86_64
    --> Processing Dependency: libvpx.so.1()(64bit) for package: php-gd-5.6.20-1.el6.remi.x86_64
    --> Processing Dependency: libgd.so.3()(64bit) for package: php-gd-5.6.20-1.el6.remi.x86_64
    --> Running transaction check
    ---> Package libvpx.x86_64 0:1.3.0-5.el6_5 will be installed
    ---> Package php-gd.x86_64 0:5.6.20-1.el6.remi will be installed
    --> Processing Dependency: gd-last(x86-64) >= 2.1.1 for package: php-gd-5.6.20-1.el6.remi.x86_64
    --> Processing Dependency: libgd.so.3()(64bit) for package: php-gd-5.6.20-1.el6.remi.x86_64
    --> Finished Dependency Resolution
    Error: Package: php-gd-5.6.20-1.el6.remi.x86_64 (remi-php56)
               Requires: gd-last(x86-64) >= 2.1.1
    Error: Package: php-gd-5.6.20-1.el6.remi.x86_64 (remi-php56)
               Requires: libgd.so.3()(64bit)
     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest
    sudo apt-get install freetype*[root@media modules]# sudo apt-get install freetype*
    sudo: apt-get: command not found

    [root@media modules]# sudo yum install freetype*
    Loaded plugins: fastestmirror, priorities, replace, security
    Setting up Install Process
    Loading mirror speeds from cached hostfile
     * base: mirror.overthewire.com.au
     * extras: mirror.nsw.coloau.com.au
     * ius: ius.mirror.digitalpacific.com.au
     * remi-php56: remi.conetix.com.au
     * rpmforge: repoforge.mirror.digitalpacific.com.au
     * updates: mirror.overthewire.com.au
    Package freetype-2.3.11-15.el6_6.1.x86_64 already installed and latest version
    Package freetype-devel-2.3.11-15.el6_6.1.x86_64 already installed and latest version
    Package freetype-demos-2.3.11-15.el6_6.1.x86_64 already installed and latest version
    Nothing to do

    [root@media modules]# service httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd:                                            [  OK  ]

    [root@media modules]# sudo yum install php56-gd
    Loaded plugins: fastestmirror, priorities, replace, security
    Setting up Install Process
    Loading mirror speeds from cached hostfile
     * base: mirror.overthewire.com.au
     * extras: mirror.nsw.coloau.com.au
     * ius: syd.mirror.rackspace.com
     * remi-php56: remi.conetix.com.au
     * rpmforge: mirror.ventraip.net.au
     * updates: mirror.overthewire.com.au
    No package php56-gd available.
    Error: Nothing to do

[root@media modules]# yum install php-gd --enablerepo=remi,remi-php56
Loaded plugins: fastestmirror, priorities, replace, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.overthewire.com.au
 * extras: mirror.nsw.coloau.com.au
 * ius: ius.mirror.digitalpacific.com.au
 * remi-php56: remi.conetix.com.au
 * rpmforge: repoforge.mirror.digitalpacific.com.au
 * updates: mirror.overthewire.com.au
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:5.6.20-1.el6.remi will be installed
--> Processing Dependency: gd-last(x86-64) >= 2.1.1 for package: php-gd-5.6.20-1.el6.remi.x86_64
--> Processing Dependency: libvpx.so.1()(64bit) for package: php-gd-5.6.20-1.el6.remi.x86_64
--> Processing Dependency: libgd.so.3()(64bit) for package: php-gd-5.6.20-1.el6.remi.x86_64
--> Running transaction check
---> Package libvpx.x86_64 0:1.3.0-5.el6_5 will be installed
---> Package php-gd.x86_64 0:5.6.20-1.el6.remi will be installed
--> Processing Dependency: gd-last(x86-64) >= 2.1.1 for package: php-gd-5.6.20-1.el6.remi.x86_64
--> Processing Dependency: libgd.so.3()(64bit) for package: php-gd-5.6.20-1.el6.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php-gd-5.6.20-1.el6.remi.x86_64 (remi-php56)
           Requires: gd-last(x86-64) >= 2.1.1
Error: Package: php-gd-5.6.20-1.el6.remi.x86_64 (remi-php56)
           Requires: libgd.so.3()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

My web app still shows

PHP GD Extension:   Not Found
PHP FreeType Support:   Not Found

And I'm pretty confident about this because it work before I uninstalled PHP and installed a different version and lost these extensions :/

  • 写回答

1条回答 默认 最新

  • douhan8581 2016-04-06 05:12
    关注

    Missing the EPEL and remi-safe repositories which provides common dependencies for the various PHP versions available in remi-php55, remi-php56, remi-php70...

    remi-safe repository is enabled by default when you install the remi-release configuration package. epel-release is a dependency of remi-release.

    The configuration wizard gives you the correct instructions.

    Duplicate of http://forum.remirepo.net/viewtopic.php?id=3402

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站