우분투 GD라이브러리 설치

  다른 뜻에 대해서는 CentOS GD라이브러리 설치 문서를 참조하십시오.
우분투 GD라이브러리 설치

1 확인[ | ]

testuser@localhost:~$ dpkg -l | grep php | grep -gd
testuser@localhost:~$ php -m | grep gd
testuser@localhost:~$ php -v
PHP 7.2.19-0ubuntu0.18.04.1 (cli) (built: Jun  4 2019 14:48:12) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.19-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologie

2 설치[ | ]

testuser@localhost:~$ sudo apt install php-gd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libgd3 libwebp6 php7.2-gd
Suggested packages:
  libgd-tools
The following NEW packages will be installed:
  libgd3 libwebp6 php-gd php7.2-gd
0 upgraded, 4 newly installed, 0 to remove and 38 not upgraded.
Need to get 333 kB of archives.
After this operation, 1046 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libwebp6 amd64 0.6.1-2 [185 kB]
Get:2 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgd3 amd64 2.2.5-4ubuntu0.3 [119 kB]
Get:3 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 php7.2-gd amd64 7.2.19-0ubuntu0.18.04.1 [27.1 kB]
Get:4 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 php-gd all 1:7.2+60ubuntu1 [1996 B]
Fetched 333 kB in 0s (15.0 MB/s) 
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libwebp6:amd64.
(Reading database ... 133032 files and directories currently installed.)
Preparing to unpack .../libwebp6_0.6.1-2_amd64.deb ...
Unpacking libwebp6:amd64 (0.6.1-2) ......................................................] 
Selecting previously unselected package libgd3:amd64.....................................] 
Preparing to unpack .../libgd3_2.2.5-4ubuntu0.3_amd64.deb ...
Unpacking libgd3:amd64 (2.2.5-4ubuntu0.3) ...............................................] 
Selecting previously unselected package php7.2-gd........................................] 
Preparing to unpack .../php7.2-gd_7.2.19-0ubuntu0.18.04.1_amd64.deb ...
Unpacking php7.2-gd (7.2.19-0ubuntu0.18.04.1) ...........................................] 
Selecting previously unselected package php-gd.#.........................................] 
Preparing to unpack .../php-gd_1%3a7.2+60ubuntu1_all.deb ...
Unpacking php-gd (1:7.2+60ubuntu1) ...#############......................................] 
Processing triggers for libc-bin (2.27-3ubuntu1) ...######...............................] 
Setting up libwebp6:amd64 (0.6.1-2) ...
Setting up libgd3:amd64 (2.2.5-4ubuntu0.3) ...###################........................] 
Setting up php7.2-gd (7.2.19-0ubuntu0.18.04.1) ...######################.................] 
debconf: unable to initialize frontend: Dialog#############################..............] 
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline

Creating config file /etc/php/7.2/mods-available/gd.ini with new version
Setting up php-gd (1:7.2+60ubuntu1) ...#######################################...........] 
Processing triggers for libc-bin (2.27-3ubuntu1) ...#################################....]

3 확인 2[ | ]

testuser@localhost:~$ php -m | grep gd
gd
testuser@localhost:~$ dpkg -l | grep php | grep gd
ii  php-gd                            1:7.2+60ubuntu1                    all          GD module for PHP [default]
ii  php7.2-gd                         7.2.19-0ubuntu0.18.04.1            amd64        GD module for PHP

4 (Optional) 아파치 재시작[ | ]

현재 구동 중인 아파치 인스턴스에 반영하기 위해서는 아파치를 재시작해야 한다.

root@zetawiki:~# service apache2 restart
 * Restarting web server apache2                               [ OK ]

5 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}