우분투16 php-zip 설치

인쇄용 판은 더 이상 지원되지 않으며 렌더링 오류가 있을 수 있습니다. 브라우저 북마크를 업데이트해 주시고 기본 브라우저 인쇄 기능을 대신 사용해 주십시오.

1 개요

우분투 php-zip 설치
우분투16 php-zip 설치
Failed to download guzzlehttp/promises from dist: The zip extension and unzip command are both missing, skipping.
Failed to download mtdowling/jmespath.php from dist: The zip extension and unzip command are both missing, skipping.

2 확인

root@zetawiki:~# php -r 'new ZipArchive();'
PHP Fatal error:  Uncaught Error: Class 'ZipArchive' not found in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1
root@zetawiki:~# php -m | grep zip
root@zetawiki:~# apt list php-zip
Listing... Done
php-zip/xenial 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 all
N: There is 1 additional version. Please use the '-a' switch to see it
root@zetawiki:~# apt list php-zip -a
Listing... Done
php-zip/xenial 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 all
php-zip/xenial 1:7.0+35ubuntu6 all

3 설치

root@zetawiki:~# apt install php-zip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libzip4 php7.1-zip
The following NEW packages will be installed:
  libzip4 php-zip php7.1-zip
0 upgraded, 3 newly installed, 0 to remove and 93 not upgraded.
Need to get 65.1 kB of archives.
After this operation, 204 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 libzip4 amd64 1.1.2-1.1+deb.sury.org~xenial+1 [40.1 kB]
Get:2 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.1-zip amd64 7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1 [19.8 kB]
Get:3 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php-zip all 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 [5,320 B]
Fetched 65.1 kB in 11s (5,744 B/s)                                                                           
Selecting previously unselected package libzip4:amd64.
(Reading database ... 86366 files and directories currently installed.)
Preparing to unpack .../libzip4_1.1.2-1.1+deb.sury.org~xenial+1_amd64.deb ...
Unpacking libzip4:amd64 (1.1.2-1.1+deb.sury.org~xenial+1) ................................................] 
Selecting previously unselected package php7.1-zip........................................................] 
Preparing to unpack .../php7.1-zip_7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.1-zip (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ........................................] 
Selecting previously unselected package php-zip.###.......................................................] 
Preparing to unpack .../php-zip_1%3a7.1+53~ubuntu16.04.1+deb.sury.org+1_all.deb ...
Unpacking php-zip (1:7.1+53~ubuntu16.04.1+deb.sury.org+1) ................................................] 
Processing triggers for libc-bin (2.23-0ubuntu9) ...################......................................] 
Processing triggers for libapache2-mod-php7.1 (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up libzip4:amd64 (1.1.2-1.1+deb.sury.org~xenial+1) ...
Setting up php7.1-zip (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ...#########...........................] 
Progress: [ 75%] [##################################################################......................] 
Creating config file /etc/php/7.1/mods-available/zip.ini with new version
Setting up php-zip (1:7.1+53~ubuntu16.04.1+deb.sury.org+1) ...############################................] 
Processing triggers for libc-bin (2.23-0ubuntu9) ...#################################################.....] 
Processing triggers for libapache2-mod-php7.1 (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ...

4 확인 2

root@zetawiki:~# apt list php-zip -a
Listing... Done
php-zip/xenial,now 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 all [installed]
php-zip/xenial 1:7.0+35ubuntu6 all
root@zetawiki:~# php -r 'new ZipArchive();'
root@zetawiki:~# php -m | grep zip
zip

5 참고

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