Symfony2:-重新安装问题 [英] Symfony2 : --reinstall issue

查看:46
本文介绍了Symfony2:-重新安装问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试为Symfony2安装Buzz。我将其添加到deps文件中,并尝试更新我的供应商:

I have been trying to install Buzz for Symfony2. I added it to the deps file, and tried to update my vendors :

php bin/vendors update

该命令只是告诉我我已经安装了标准版本,应该尝试使用:

The command simply tells me that I've installed the standard version, and that I should try to use :

php bin/vendors install --reinstall

相反。

但是随后出现一个错误并告诉我:

But then an error pops in and tells me :

Updating deps.lock
sh:/var/www/Symfony/vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php: not found
PHP Fatal error:  Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in /var/www/Symfony/app/autoload.php on line 37
PHP Fatal error:  Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in /var/www/Symfony/app/autoload.php on line 37

然后什么都没有可以正常工作了,这并不奇怪,因为我的vendor文件夹几乎是空的。

And then nothing works anymore, which is not surprising because my vendors folder is almost empty.

以前有人遇到过此问题吗?

Has anyone encountered this problem before? Any clue on how to fix it?

编辑:

我发现了此错误的根源。我没有安装git,所以我做了:

I found out the origin of this error. I didn't have git installed, so I did :

sudo apt-get install git-core

检查此链接以获取有关此信息的更多信息: http://comments.gmane.org/gmane.comp.php.symfony.symfony2/8239

Check this link for more info on that : http://comments.gmane.org/gmane.comp.php.symfony.symfony2/8239

但是我现在遇到另一个错误(寻找名称空间 buzz.client.curl,未找到任何东西)。我正在为该线程创建另一个线程,因为它不是同一个问题(链接此处)。

However I'm having another error now ("Looked for namespace "buzz.client.curl", found none"). I'm making another thread for that one, as it is not the same problem (link here).

推荐答案

这不是更新供应商的正确方法。根据文档

That's not the right way to update your vendors. Per the docs


还有一个 php bin / vendors update 命令,但这没有
与升级项目有关,通常不需要
使用它。此命令用于冻结所有
供应商库的版本,方法是将它们更新为 deps 中指定的版本,并将
记录到 deps.lock 文件。

There is also a php bin/vendors update command, but this has nothing to do with upgrading your project and you will normally not need to use it. This command is used to freeze the versions of all of your vendor libraries by updating them to the version specified in deps and recording it into the deps.lock file.

Ergo,您所需要做的就是运行 php bin / vendors install (我知道,这很令人困惑。我部分归咎于他们对子命令的命名不正确)

Ergo, all you need to do is run php bin/vendors install (I know, it's confusing. I partially blame them for poorly naming the sub-command)

为帮助解决当前问题,请尝试以下步骤

To help resolve your current issues, try these steps


  1. rm -rf供应商/ *

  2. rm -rf app / cache / *

  3. rm app / bootstrap.php.cache

  4. php bin / vendors install

  1. rm -rf vendor/*
  2. rm -rf app/cache/*
  3. rm app/bootstrap.php.cache
  4. php bin/vendors install

希望它能正常工作

这篇关于Symfony2:-重新安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆