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

Tuesday, January 4, 2022

[FIXED] Unable to write keys.dev.pub to: /home/ubuntu/.composer

 January 04, 2022     composer-php, key, terminal, ubuntu, vagrant     No comments   

Issue

I'm following the instructions to install composer (found here). I just ran the line php composer-setup.php and the terminal returned:

All settings correct for using Composer
Unable to write keys.dev.pub to: /home/ubuntu/.composer

I'm installing into a Ubuntu VM in Vagrant.


Solution

It can happen when you have a previous installation of composer not completely removed or if you are running the installer with a user different to the owner of .composer folder.

You can rename the old folder (to have a backup) and then try again:

mv ~/.composer ~/.composer.old

This is less risky than executing something unknown with sudo.



Answered By - PhoneixS
  • 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