首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PHP Composer安装

PHP Composer安装
EN

Stack Overflow用户
提问于 2012-12-30 03:20:18
回答 1查看 3.9K关注 0票数 1

我在一个控制台中,通过ssh连接到一台服务器。现在我从git上克隆了我的项目。

如果我执行以下操作:php composer.phar install,我会得到下一个错误:

代码语言:javascript
复制
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:

代码语言:javascript
复制
{
    "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": "git@bitbucket.org:name1/name1bundle.git"
        },
        {
            "type": "vcs",
            "url": "git@bitbucket.org: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 (外部托管服务器)

代码语言:javascript
复制
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。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-12-30 03:59:38

wget最新的composer.phar以确保您在那里是安全的。或者你可以做的更好:

代码语言:javascript
复制
php composer.phar self-update

问题1和2很可能有一些非法的版本符号。尝试使用特定的版本号将jdorn/sql-formatter包直接添加到您自己的需求中。

问题3和4与composer无关。您的系统上没有安装PHP扩展intl,但它是某些ZF2组件的必需依赖项。这意味着您需要在服务器上安装它或将其编译成PHP。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14085098

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档