install php70-gd on ubuntu

前端 未结 6 1196
攒了一身酷
攒了一身酷 2020-12-05 06:21

Recently the new php7 has been released. However, when I am trying to install the gd package, the library can not be found.

I have tried through

sudo         


        
6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 06:35

    PHP7 packages for Ubuntu including php7.0-gd can be installed via PPA for PHP by Ondřej Surý:

    sudo add-apt-repository ppa:ondrej/php
    sudo apt-get update
    

    Next, install the desired version:

    sudo apt-get install php7.0-gd
    # or
    sudo apt-get install php7.1-gd
    # or
    sudo apt-get install php7.2-gd
    # or
    sudo apt-get install php7.3-gd
    # or
    sudo apt-get install php7.4-gd
    

    EDIT:

    As MacroMan stated, under Ubuntu 16.04 you don't need to add the repository any more. Simply issuing sudo apt-get install php7.0-gd works.

提交回复
热议问题