PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 23, 2022

[FIXED] Having Problems With Updating Composer

 January 23, 2022     composer-php, symfony, vagrant     No comments   

Issue

I am running into some problems trying to update composer, after trying to add php-imap.

I am getting this error:

Plugin initialization failed (include(/var/www/vendor/composer/package-versions-deprecated/src/PackageVersions/Installer.php): failed to open stream: No such file or directory), uninstalling plugin

  • Removing composer/package-versions-deprecated (1.10.99) Install of composer/package-versions-deprecated failed

[RuntimeException]
Could not delete /var/www/vendor/composer/package-versions-deprecated/src:

the file (/var/www/vendor/composer/package-versions-deprecated/src/PackageVersions/Installer.php) does exist.


Solution

Composer cannot delete the /var/www/vendor/composer/package-versions-deprecated/src directory. I guess current user cannot write/delete directory in /var/www

Option1 (recommanded) You can (you have to) fix the right to this directory and verify that current connected user has enough privilege to do it.

Option2 You can install application locally (in a directory where current user have all privileges, Launch composer Move via root the application to the /var/www directory Chown files to the good user. (www:data ?)

Option3 (not recommanded) You can delete this directory manually via root. But I'm sure you will encountered a lot of other problems.



Answered By - Alexandre Tranchant
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing