2012-12-29 432 views
1

我在一個控制檯與服務器的SSH連接。 現在我有一個來自git的項目的克隆。PHP作曲家安裝

如果我做以下的事情:php composer.phar install我得到了一個錯誤:

Loading composer repositories with package information 
Installing dependencies from lock file 
Your requirements could not be resolved to an installable set of packages. 

    Problem 1 
    - Installation request for doctrine/doctrine-bundle dev-master -> satisfiable by doctrine/doctrine-bundle dev-master. 
    - doctrine/doctrine-bundle dev-master requires jdorn/sql-formatter >=1.1,<2.0 -> no matching package found. 
    Problem 2 
    - Installation request for doctrine/doctrine-bundle 1.0.x-dev -> satisfiable by doctrine/doctrine-bundle 1.0.x-dev. 
    - doctrine/doctrine-bundle 1.0.x-dev requires jdorn/sql-formatter >=1.1,<2.0 -> no matching package found. 
    Problem 3 
    - Installation request for zendframework/zend-i18n 2.0.5 -> satisfiable by zendframework/zend-i18n 2.0.5. 
    - zendframework/zend-i18n 2.0.5 requires ext-intl * -> the requested PHP extension intl is missing from your system. 
    Problem 4 
    - zendframework/zend-i18n 2.0.5 requires ext-intl * -> the requested PHP extension intl is missing from your system. 
    - zendframework/zend-validator 2.0.5 requires zendframework/zend-i18n 2.0.5 -> satisfiable by zendframework/zend-i18n 2.0.5. 
    - Installation request for zendframework/zend-validator 2.0.5 -> satisfiable by zendframework/zend-validator 2.0.5. 

Potential causes: 
- A typo in the package name 
- The package is not available in a stable-enough version according to your minimum-stability setting 
    see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details. 

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems. 

我composer.js:

{ 
    "name": "symfony/framework-standard-edition", 
    "description": "The \"Symfony Standard Edition\" distribution", 
    "autoload": { 
     "psr-0": { "": "src/" } 
    }, 
    "require": { 
     "php": ">=5.3.3", 
     "symfony/symfony": "2.1.*", 
     "doctrine/orm": ">=2.2.3,<2.4-dev", 
     "doctrine/doctrine-bundle": "1.0.*", 
     "twig/extensions": "1.0.*", 
     "symfony/assetic-bundle": "2.1.*", 
     "symfony/swiftmailer-bundle": "2.1.*", 
     "symfony/monolog-bundle": "2.1.*", 
     "sensio/distribution-bundle": "2.1.*", 
     "sensio/framework-extra-bundle": "2.1.*", 
     "sensio/generator-bundle": "2.1.*", 
     "jms/security-extra-bundle": "1.2.*", 
     "jms/di-extra-bundle": "1.1.*", 
     "friendsofsymfony/user-bundle": "*", 
     "friendsofsymfony/jsrouting-bundle": "1.0.*", 
     "mv/name1-bundle" : "*", 
     "mv/name2-bundle" : "*", 
     "psliwa/pdf-bundle": "*" 
    }, 
    "scripts": { 
     "post-install-cmd": [ 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 
     ], 
     "post-update-cmd": [ 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 
     ] 
    }, 
    "repositories": [ 
     { 
      "type": "vcs", 
      "url": "[email protected]:name1/name1bundle.git" 
     }, 
     { 
      "type": "vcs", 
      "url": "[email protected]:name2/name2bundle.git" 
     }, 
     { 
      "type": "composer", 
      "url": "http://packages.zendframework.com/" 
     }, 
     { 
      "type": "composer", 
      "url": "http://packagist.org/" 
     } 
    ], 
    "minimum-stability": "dev", 
    "extra": { 
     "symfony-app-dir": "app", 
     "symfony-web-dir": "public_html", 
     "symfony-assets-install": "symlink" 
    } 
} 

奇怪的是,當地的它就像一個魅力!但在服務器上它給了我錯誤。什麼是問題以及如何解決這個問題?

哦,我不能做php composer.phar update(EXTERN的服務器)

Loading composer repositories with package information 
Updating dependencies         

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 71 bytes) in phar:///composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 47 

日Thnx。

+0

應該是'composer.json',而不是'composer.js'。 – Fred

+0

它可能是一個錯字..從一年前..如果它是我真正的文件名我不能'作曲家更新' –

回答

2

wget最新的composer.phar,以確保您在那裏安全。或者你可以做得更好:

php composer.phar self-update 

問題1和2最有可能對版本有一些非法表示法。嘗試使用特定的版本號直接將jdorn/sql-formatter包添加到您自己的要求中。

問題3和4與作曲家無關。 PHP擴展intl未安裝在您的系統上,但它是一些ZF2組件所需的依賴項。這意味着您需要在服務器上安裝它或將其編譯到PHP中。

+0

「intl''擴展是什麼奇怪的是,本地工作正常,我沒有安裝該擴展。我甚至不使用該擴展名。有沒有辦法忽略此消息以繼續? –

+0

我假設你在本地使用某種AMP包,比如Zend Server CE或其他東西。那麼這個擴展就已經和它捆綁在一起了。不,你不能忽視它,Zend-i18n使用這個擴展,這就是爲什麼它是一個依賴。如果你不需要zend-i18n,那麼不要安裝它。 – markus

+0

我想要說的是,我通過FTP手動將供應商粘貼到服務器上。一切都像一個魅力!這意味着我不使用該擴展名。但我需要zend爲我的PDF包:https://github.com/psliwa/PdfBundle –