개발! 딱 깔끔하고 센스있게!

Composer 설치: json 확장이 부족합니다 본문

개발 스크랩 메모/PHP

Composer 설치: json 확장이 부족합니다

렉사이 2020. 12. 22. 02:40

Linux 터미널에 글을 썼습니다:curl-s https://getcomposer.org/instller위에서 말하기:

 #!/usr/bin/env php Some settings on your machine make Composer unable to work properly. Make sure that you fix the issues listed below and run this script again: The json extension is missing. Install it or recompile php without --disable-json 

내가 했어: apt get 설치 php5 json그래서 나는 그것이 이미 설치되었다고 생각한다.

그런데 이상하게, 내가 php-m 쓸 때json 이 없는 목록을 내게 주었다.

[PHP Modules] bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext hash iconv libxml mbstring mhash openssl pcntl pcre Phar posix Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib [Zend Modules] 

php5 fpm-m 쓸 때이것을 보내기:

[PHP Modules] bcmath bz2 calendar cgi-fcgi Core ctype curl date dba dom ereg exif fileinfo filter ftp gettext hash iconv json libxml mbstring mcrypt mhash mysqli openssl pcre PDO pdo_mysql Phar posix Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib [Zend Modules] 

제가 뭘 잘못했어요?저는 아직 GitHub 과 Google 에서 해결 방안을 찾지 못했어요.

대답

php.ini 파일에서 확장자를 사용할 수 있습니다.

명령행 PHP 위치를 찾으려면 실행하십시오

php --ini 

너는 이런 선을 봐야 한다.

Loaded Configuration File: /path/to/php.ini

이 파일을 열고 확장자를 찾기 = json.so.거기에 있다면 주석을 취소하라.없다면 넣어라.현재 php-m 과 composer 를 사용할 때 json 목록을 볼 수 있을 것입니다.

Comments