У меня ошибка при попытке запустить установку композитора или обновление композитора.
Моя среда: VirtualBox, Vagrant, Centos7, Php 7.2
Я использовал этот метод для установки композитора:
cd /var/www/html/<project folder>
sudo yum install php-cli php-zip wget unzip
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --install-dir=/usr/bin --filename=composer
Я пытался игнорировать и переходить к моменту установки, но получил ошибку.
[vagrant@localhost ci_blog]$ composer require moment/moment
Using version ^2.24 for moment/moment
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
- Installing symfony/process (v3.4.33): Loading from cache
- Installing kriswallsmith/assetic (v1.4.0): Loading from cache
- Installing robloach/component-installer (0.2.3): Loading from cache
Plugin installation failed, rolling back
- Removing robloach/component-installer (0.2.3)
Installation failed, reverting ./composer.json to its original content.
[ErrorException]
include(/var/www/html/ci_blog/vendor/robloach/component-installer/src/ComponentInstaller/ComponentInstallerPlugin.p
hp): failed to open stream: No such file or directory
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...
Я также искал решения в Google, но ничто не выглядело как эта ошибка.
[vagrant@localhost ci_blog]$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Generated autoload files containing 625 classes
> CodeIgniter\ComposerScripts::postUpdate
> bash admin/setup.sh
admin/setup.sh: line 2: $'\r': command not found
cp: cannot create regular file ‘.git/hooks/pre-commit\r’: Protocol error
chmod: cannot access ‘.git/hooks/pre-commit\r’: No such file or directory
Script bash admin/setup.sh handling the post-update-cmd event returned with error code 1
Спасибо, вся помощь оценена.