I can't seem to be able to complete installation of bundles using
composer require <bundle-name>
because of these errors:
[Symfony\Component\Filesystem\Exception\IOException] Failed to remove directory "/var/www/emerson-suite/var/cache/de~/pools/rDfZ
I1q9aB": .
Complete console output of error:
Generating autoload files ocramius/package-versions: Generating version class... ocramius/package-versions: ...done generating version class
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
// Clearing the cache for the dev environment with debug // true
Symfony\Component\Filesystem\Exception\IOException] Failed to remove directory "/var/www/emerson-suite/var/cache/de~/pools/rDfZ
I1q9aB": .cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--]
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception
Installation failed, reverting ./composer.json to its original content.
[RuntimeException] An error occurred when executing the "'cache:clear --no-warmup'" command: // Clearing the cache for the dev environment with debug // true
[Symfony\Component\Filesystem\Exception\IOException] Failed to remove directory "/var/www/emerson-suite/var/cache/de~/pools/rDfZ I1q9aB": .
cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--]
Tried running composer with both sudo
and without.
The command that I ran is: $ sudo composer require javiereguiluz/easyadmin-bundle
Not sure what to do about this, any help is appreciated.
Update
My environment is Ubuntu on Vagrant VM on Mac OS X.
rm -rf var/cache/* vendor/*
. – Stephan Vierkant