Yii 2.0.15 update fails

Just tried to update my 2.0.14 install (on current Debian), according to:

https://www.yiiframework.com/news/168/releasing-yii-2-0-15-and-database-extensions-with-security-fixes

…with the command:


composer require "yiisoft/yii2":"~2.0.15.0"

It failed with this error:


    [RuntimeException]

    Could not delete /var/www/../vendor/bin/yii:  



Next I tried


sudo composer..

  • which gets rejected - root is not allowed.

Then, search via google found this article:

https://www.yiiframework.com/wiki/660/what-to-do-when-composer-fails-to-update-your-vendor-packages

So I archived and deleted vendor/ and composer.lock and started:


php composer.phar install 

Then I got the error


    .../yiisoft/yii2-composer does not exist and could not be created.



So it seems this parameter has to be set - to which value?:

–prefer-dist

Or, if the above wiki article is not the solution, what could help (after restoring the archive)?

Don’t run composer with sudo!!!

It’s like a permission issue. Check that!

Permissions have not changed since the last update, from 2.0.13 to 14.