2017-12-11 1 views
1

나는 다음과 같은 오류가있어 심포니 4 프로젝트 생성 작곡가를 사용하려고 시도하는 동안 : 그것을 가능하게하기 위해 내가 주석을 제거 할 수 있다면PHP ext-xml을 사용 하시겠습니까?

[email protected] ~ $ php composer.phar create-project symfony/skeleton my-proj 
Installing symfony/skeleton (v4.0.0) 
    - Installing symfony/skeleton (v4.0.0): Loading from cache 
Created project in my-proj 
Loading composer repositories with package information 
Updating dependencies (including require-dev) 
Your requirements could not be resolved to an installable set of packages. 

    Problem 1 
    - symfony/framework-bundle v4.0.1 requires ext-xml * -> the requested PHP extension xml is missing from your system. 
    - symfony/framework-bundle v4.0.0 requires ext-xml * -> the requested PHP extension xml is missing from your system. 
    - Installation request for symfony/framework-bundle ^4.0 -> satisfiable by symfony/framework-bundle[v4.0.0, v4.0.1]. 

    To enable extensions, verify that they are enabled in your .ini files: 
    - /etc/php/7.2/cli/php.ini 
    - /etc/php/7.2/cli/conf.d/10-opcache.ini 
    - /etc/php/7.2/cli/conf.d/10-pdo.ini 
    - /etc/php/7.2/cli/conf.d/20-calendar.ini 
    - /etc/php/7.2/cli/conf.d/20-ctype.ini 
    - /etc/php/7.2/cli/conf.d/20-exif.ini 
    - /etc/php/7.2/cli/conf.d/20-fileinfo.ini 
    - /etc/php/7.2/cli/conf.d/20-ftp.ini 
    - /etc/php/7.2/cli/conf.d/20-gettext.ini 
    - /etc/php/7.2/cli/conf.d/20-iconv.ini 
    - /etc/php/7.2/cli/conf.d/20-json.ini 
    - /etc/php/7.2/cli/conf.d/20-phar.ini 
    - /etc/php/7.2/cli/conf.d/20-posix.ini 
    - /etc/php/7.2/cli/conf.d/20-readline.ini 
    - /etc/php/7.2/cli/conf.d/20-shmop.ini 
    - /etc/php/7.2/cli/conf.d/20-sockets.ini 
    - /etc/php/7.2/cli/conf.d/20-sysvmsg.ini 
    - /etc/php/7.2/cli/conf.d/20-sysvsem.ini 
    - /etc/php/7.2/cli/conf.d/20-sysvshm.ini 
    - /etc/php/7.2/cli/conf.d/20-tokenizer.ini 
    You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode. 
[email protected] ~ $ php --ini 

    [email protected] ~ $ php --version 
     PHP 7.2.0-2+ubuntu16.04.1+deb.sury.org+2 (cli) (built: Dec 7 2017 20:14:31) (NTS) 
     Copyright (c) 1997-2017 The PHP Group 
     Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies 
     with Zend OPcache v7.2.0-2+ubuntu16.04.1+deb.sury.org+2, Copyright (c) 1999-2017, by Zend Technologies 
    [email protected] ~ $ sudo apt-get install php-xml 
     [sudo] password for steve: 
     Reading package lists... Done 
     Building dependency tree  
     Reading state information... Done 
     php-xml is already the newest version (1:7.1+55+ubuntu16.04.1+deb.sury.org+1). 
     0 to upgrade, 0 to newly install, 0 to remove and 253 not to upgrade. 

내가 EXT-XML에 대한 php.ini 파일에서 검색이 볼 않았다을하지만, ext-xml에 대한 언급을 찾지 못했습니다. 나는 내가하고있는 일에 대해 확신이 없기 때문에 다른 곳에서는 수색하지 않았다. 어떤 도움은 매우 극명하게 될 것이다

, 스티브

당신은 PHP의 최신 버전을 우분투에게 드레이/PHP는 PPA와 16.04을 사용하고있는 것 같습니다
+0

[XML 확장을 찾을 수 없음] 가능한 복제본 (https://stackoverflow.com/questions/21859128/xml-extension-not-found) –

답변

2

.

apt-get install php7.2-xml 

당신은이 같은 뭔가 다른 버전을 사용할 수 볼 수 있습니다 :이 경우, 패키지 이름을 사용하고 당신의 PHP의 버전과 일치 할 필요는 구성에 따라

apt-cache search php | grep xml 

, 설치 명령의 접두어를 sudo과 같이 사용해야 할 수도 있습니다.

+0

대단히 감사합니다. 이로써 Symfony 4가 작동하게되었습니다. 나는 Linux Mint 18.2 Sonya를 실행하고 있는데 이것은 우분투 16.04를 기반으로한다고 생각한다. 나는 php를 ondrej/php ppa에서 업데이트하여 Symfony 4를 얻는 데 관련된 많은 문제를 해결했지만 php-xml 문제는 해결하지 못했습니다. – user3425506

관련 문제