Saturday, 25 October 2008

Plugin installation failed: No valid packages found

Well, I am still exploring symfony and its many interesting options. One of the features that really appeals to me is the ability to secure certain actions (e.g. "create", "save") for a given module (e.g. "user" module, "group" module) using user credentials (e.g. "admin", "guest"). The only catch is that this inbuilt mechanism doesn't provide login per se which means you can set credentials, but have to create the login process yourself. The most obvious way to avoid this is simply to install the sfGuardPlugin plugin for symfony.

I typed the installation command but came across the following:


cmd>> symfony plugin:install sfGuardPlugin

>> plugin installing plugin "sfGuardPlugin"
>> sfPearFrontendPlugin downloading sfGuardPlugin-3.0.0.tgz ...
>> sfPearFrontendPlugin Starting to download sfGuardPlugin-3.0.0.tgz (18,752 bytes)
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin ...done: 18,752 bytes
>> sfPearFrontendPlugin symfony-plugins/sfGuardPlugin requires package
>> sfPearFrontendPlugin "symfony/symfony" (version >= 1.2.0, version <= 1.3.0,
>> sfPearFrontendPlugin excluded versions: 1.3.0), installed version is 1.1.4

Plugin "sfGuardPlugin" installation failed: No valid packages found


The problem here was simply that the latest version of the package was being used. That particular version (3.0.0) is meant for symfony 1.2 which is still being developed. Since I am using the latest stable release of symfony (1.1.4), the trick is simply to specify which release to install. To work this out, simply check out the sfGuardPlugin changelog page to find the correct release version number (2.2.0).


cmd>> symfony plugin:install sfGuardPlugin --release=2.2.0


And hey presto, it worked! Excellent. More on symfony soon...

Thoughts in the meantime?

9 comments:

Anonymous said...

Thank you for this article. It helpted me a lot.

Best regards!

Elinor said...

Hi Nikolay,
Glad to hear it was useful! :-)
Best regards,
Elinor

Anonymous said...

Nice tip, i spend few hours trying to install sfGuardPlugin with this problem. Thanks!

Elinor said...

Hi,
Glad it helped! :-)
Elinor

Anonymous said...

Thank you very much!

Anonymous said...

Thanks, this helped out a bunch as I really didn't want to install the unstable build...

Elinor said...

Excellent, really glad it was of use to you! :-)

Anonymous said...

Thank you very much!

Elinor said...

:-)

Online Marketing
Add blog to our blog directory blog search directory Blog Directory Blogarama - The Blog Directory