6
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windows+Vagrantでcomposer installすると"Could not delete /vagrant/vendor/"エラーが発生する場合の対処

Last updated at Posted at 2019-06-18

エラーの内容

Windows+Vagrant(VirtualBox)の環境でcomposer installを実行した際、以下のエラーが発生しました。
(開始後数秒で発生)

  - Installing kylekatarnls/update-helper (1.1.1): Reading /home/vagrant/.cache/composer/files/kylekatarnls/update-helper/b43c77a2aeb46815c21e75203bfa7b68c3c25b08.zip from cache
Loading from cache
 Extracting archiveExecuting command (CWD): unzip -qq  '/vagrant/vendor/kylekatarnls/update-helper/466d1f46652da6405e025fc97e3b7597' -d '/vagrant/vendor/composer/fe5048b1'
Plugin installation failed, rolling back
  - Removing kylekatarnls/update-helper (1.1.1)


  [RuntimeException]
  Could not delete /vagrant/vendor/kylekatarnls/update-helper/src/UpdateHelper:


Exception trace:
 () at phar:///usr/bin/composer/src/Composer/Util/Filesystem.php:217
 Composer\Util\Filesystem->unlink() at phar:///usr/bin/composer/src/Composer/Util/Filesystem.php:170
...(以下略)...

TL;DR

"Plugin installation failed"というのが気になり以下のように実行したところ、通るようになりました。

composer install --no-plugins

※"プラグイン"とは何かを理解せずに無効にしているので、その点が少し心配です。

その他に考えられるもの

今回の事象には当てはまらなかったものの、以下の記事も参考にしました。

6
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?