php - 无法在 centos 上使用 yum 安装 php-gd 和 freetype

标签 php linux centos yum

我无法在 centos 上安装 GD 和 Freetype for PHP。

我读过很多类似的问题,比如这个 Install GD library and freetype on Linux 但我仍然没有运气..

    [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

我的网络应用程序仍然显示

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

我对此非常有信心,因为在我卸载 PHP 并安装不同版本并丢失这些扩展之前它可以工作:/

最佳答案

缺少 EPELremi-safe为 remi-php55、remi-php56、remi-php70 中可用的各种 PHP 版本提供通用依赖项的存储库...

在安装 remi-release 配置包时默认启用 remi-safe 存储库。 epel-release 是 remi-release 的依赖。

configuration wizard给你正确的指示。

重复 http://forum.remirepo.net/viewtopic.php?id=3402

关于php - 无法在 centos 上使用 yum 安装 php-gd 和 freetype,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36438897/

相关文章:

php - 获取没有信息模式的 FTS 索引名称

linux - 在 Linux 中控制连接的蓝牙设备音量的命令?

php - 如何使用Chef PHP Cookbook安装高于5.3.3的版本

php - 在 w3-row-padding 中循环 w3-quarter

php - laravel 微风多重身份验证 - 具有两种不同注册的管理员保护

python - Web2py无法访问互联网[连接被拒绝]

linux - 如果 linux 程序以 coredump 退出,未关闭的文件可能会导致资源泄漏

centos - 在 puppet 中调试失败 'boost::locale::conv::invalid_charset_error'

php - Centos 7、Citadel 电子邮件、服务器、phpmailer 和 S/MIME

php - 将 crypt() salt 存储在数据库中以进行密码比较是否安全