我正在尝试从composer安装TCPDF。这是package的链接。我在composer.json
中有以下内容{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": ">2.2.0rc1",
"zendframework/zftool": "dev-master",
"cgm/zf2-file-upload-examples": ">=1.0.0",
"zf-commons/zfc-user": "dev-master",
"gowsram/g-maps": "dev-master",
"ghislainf/zf2-whoops": "dev-master",
"nitecon/zf2-db-session": "1.*",
"ghislainf/geonames-server": "v0.9",
"aaron4m/zf2-static-pages": "dev-master",
"email-zf2/emailzf2": "dev-master",
"dkplus/crud": "dev-hotfix/6",
"doctrine/doctrine-orm-module": "0.*",
"zf-commons/zfc-admin": "dev-master",
"zendexperts/ze-theme": "dev-master",
"zendframework/zend-developer-tools": "dev-master",
"bjyoungblood/bjy-authorize": "dev-master",
"bjyoungblood/BjyProfiler": "dev-master",
"evandotpro/edp-module-layouts": "dev-master",
"doctrine/migrations": "dev-master",
"mwillbanks/zfc-twitter-bootstrap": "dev-master",
"twig/twig": "~1.0",
"leafo/lessphp": "0.3.*@dev",
"leafo/scssphp": "dev-master",
"leafo/scssphp-compass": "dev-master",
"ptachoire/cssembed": "dev-master",
"rwoverdijk/assetmanager": "1.*",
"hybridauth/hybridauth": "dev-master",
"socalnick/scn-social-auth": "dev-master",
"aws/aws-sdk-php": "2.*",
"doctrine/common": "2.4.*@dev",
"doctrine/annotations": "1.0.*@dev",
"ircmaxell/random-lib": "1.0.*@dev",
"ocramius/proxy-manager": "0.5.*@dev",
"zendframework/zendpdf": "2.0.*@dev",
"zendframework/zendservice-recaptcha": "2.0.*@dev",
"bjyoungblood/bjy-profiler": "dev-master",
"ocramius/ocra-service-manager": "dev-master",
"doctrine/data-fixtures": "1.0.*@dev",
"symfony/dependency-injection": "2.4.*@dev",
"symfony/http-kernel": "2.4.*@dev",
"doctrine/cache": "1.0.*@dev",
"monolog/monolog": "1.6.*@dev",
"danielss89/zfc-user-admin": "dev-master",
"zf-commons/zfc-user-doctrine-orm": "dev-master",
"darkmatus/roleuserbridge": "dev-master",
"neilime/zf2-twb-bundle": "1.0"
"tecnick.com/tcpdf": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
}
}
当我运行php composer.phar update时,它总是显示以下错误:
Loading composer repositories with package information
更新依赖项(包括require-dev) - 安装tecnick.com/tcpdf(dev-master 6b842db) 克隆6b842db6c4c42941c7233dc19fffa695f14d4000
[Symfony的\元器件\过程\异常\的RuntimeException]
该过程超时。
如何解决此错误?或者,如果有任何替代方法在ZF2项目中包含TCPDF;如果是,请提供一些有关安装和使用的文档。
谢谢
答案 0 :(得分:1)
您必须使用以下行给url存储库:
**
"repositories": [
{
"type":"package",
"package": {
"name": "tecnick.com/tcpdf",
"version":"master",
"source": {
"url": "http://git.code.sf.net/p/tcpdf/code", /* or something like that, it's the repo url*/
"type": "git",
"reference":"master"
}
}
],
"require": {
...
与'require'处于同一水平
答案 1 :(得分:-1)
在上一段代码中,我们需要使用“}”关闭包。
在我的情况下,我已经通过添加这样的存储库来修复它:
"repositories" : {
"sourceforge": {
"type": "vcs",
"url": "http://git.code.sf.net/p/tcpdf/code"
}
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
[...] Some others [...]
"whiteoctober/tcpdf-bundle": "dev-master"
},