우분투16 php-curl 설치

(우분투 php-curl 설치에서 넘어옴)
우분투16 php-curl 설치
PHP Fatal error: Uncaught Error: Call to undefined function curl_init()

1 확인[ | ]

root@zetawiki:~# php -m | grep curl
root@zetawiki:~# php -r "curl_init();"
PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1
root@zetawiki:~# apt list php-curl
Listing... Done
php-curl/xenial,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

2 설치[ | ]

root@zetawiki:~# apt install php-curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libcurl3 php7.1-curl
The following NEW packages will be installed:
  libcurl3 php-curl php7.1-curl
0 upgraded, 3 newly installed, 0 to remove and 21 not upgraded.
Need to get 220 kB of archives.
After this operation, 693 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcurl3 amd64 7.47.0-1ubuntu2.2 [186 kB]
Get:2 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.1-curl amd64 7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1 [28.3 kB]
Get:3 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php-curl all 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 [5,322 B]
Fetched 220 kB in 1s (177 kB/s)      
Selecting previously unselected package libcurl3:amd64.
(Reading database ... 102126 files and directories currently installed.)
Preparing to unpack .../libcurl3_7.47.0-1ubuntu2.2_amd64.deb ...
Unpacking libcurl3:amd64 (7.47.0-1ubuntu2.2) ............................................] 
Selecting previously unselected package php7.1-curl......................................] 
Preparing to unpack .../php7.1-curl_7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.1-curl (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ......................] 
Selecting previously unselected package php-curl.........................................] 
Preparing to unpack .../php-curl_1%3a7.1+53~ubuntu16.04.1+deb.sury.org+1_all.deb ...
Unpacking php-curl (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 libcurl3:amd64 (7.47.0-1ubuntu2.2) ...
Setting up php7.1-curl (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) .....................] 
Progress: [ 75%] [######################################################.................] 
Creating config file /etc/php/7.1/mods-available/curl.ini with new version
Setting up php-curl (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) ...

3 확인 2[ | ]

root@zetawiki:~# apt list php-curl
Listing... Done
php-curl/xenial,xenial,now 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 all [installed]
N: There is 1 additional version. Please use the '-a' switch to see it
root@zetawiki:~# php -r "curl_init();"
root@zetawiki:~# php -m | grep curl
curl

4 같이 보기[ | ]

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