Answer the question
In order to leave comments, you need to log in
How to install symfony on vagrant (homestead)?
Greetings.
I can’t install symphony from composer in any way, I get an error:
Could not delete /var/www/site.ru/www/vendor/symfony/flex/src/Command:
[email protected]:/var/www/site.ru/www# composer -vvv create-project symfony/website-skeleton .
....
Package operations: 1 install, 0 updates, 0 removals
Installs: symfony/flex:v1.4.5
- Installing symfony/flex (v1.4.5): Reading /root/.cache/composer/files/symfony/flex/6d95ad17b465d814bf18c301dfe2e548420960f3.zip from cache
Loading from cache
Extracting archiveExecuting command (CWD): unzip -qq '/var/www/site.ru/www/vendor/symfony/flex/58b6844a5398a2e9d36347f1c9c4cf48' -d '/var/www/site.ru/www/vendor/composer/0819fb2d'
Loading plugin Symfony\Flex\Flex
Plugin installation failed, rolling back
- Removing symfony/flex (v1.4.5)
Reading ./composer.json
Loading config file /root/.config/composer/config.json
Loading config file /root/.config/composer/auth.json
Loading config file ./composer.json
Reading /root/.config/composer/composer.json
Loading config file /root/.config/composer/config.json
Loading config file /root/.config/composer/auth.json
Loading config file /root/.config/composer/composer.json
Loading config file /root/.config/composer/auth.json
Reading /root/.config/composer/auth.json
[RuntimeException]
Could not delete /var/www/site.ru/www/vendor/symfony/flex/src/Command:
Exception trace:
() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:217
Composer\Util\Filesystem->unlink() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:170
Composer\Util\Filesystem->removeDirectoryPhp() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:137
Composer\Util\Filesystem->removeDirectory() at phar:///usr/local/bin/composer/src/Composer/Downloader/FileDownloader.php:238
Composer\Downloader\FileDownloader->remove() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:299
Composer\Downloader\DownloadManager->remove() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:224
Composer\Installer\LibraryInstaller->removeCode() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:137
Composer\Installer\LibraryInstaller->uninstall() at phar:///usr/local/bin/composer/src/Composer/Installer/PluginInstaller.php:66
Composer\Installer\PluginInstaller->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:173
Composer\Installer\InstallationManager->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:160
Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:597
Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:229
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/CreateProjectCommand.php:195
Composer\Command\CreateProjectCommand->installProject() at phar:///usr/local/bin/composer/src/Composer/Command/CreateProjectCommand.php:145
Composer\Command\CreateProjectCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:245
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:835
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:185
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:267
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:106
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:61
require() at /usr/local/bin/composer:24
{
"config": {
"process-timeout": 2400,
"preferred-install": "dist",
"github-protocols": ["https"]
}
}
Answer the question
In order to leave comments, you need to log in
The problem turned out to be when installing to a directory that was mounted from the host machine. If you do the installation from the directory above, then everything is ok.
Those. the directory /var/www/site.ru/www is mounted, it is not installed in it.
to a directory that is not synchronized /var/www/site.ru/test was installed without errors.
The solution is to install in a different directory, then copy all the files to the working one.
Upd.
Will update the answer for future readers. It helps to change the type of synchronization:
folders:
- map: C:/projects/site.ru/www/
to: /var/www/site.ru/www/
type: smb
It is strange that you install from the root, the composer loses the rights to delete the file due to the stacktrace, you definitely do not change anything in the process of deploying the project?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question