Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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.

like image 492
reelyard Avatar asked Feb 23 '17 11:02

reelyard


People also ask

How do I fix the composer installer error?

Make sure you have no problems with your setup by running the installer's checks via curl -sS https://getcomposer.org/installer | php -- --check . Try clearing Composer's cache by running composer clear-cache . Ensure you're installing vendors straight from your composer.

How do I know if my composer is working?

You can check your installed composer version using a command composer -v at the current path. Such as: composer -v.

What is composer in ubuntu?

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.


1 Answers

While installing the Composer in your Project Directory you may Get this error. Im Using the Ubuntu 16,While installing i faced the Same Issue


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

Step 1: just go to your Project Directory and run a Command

sudo su 

Step 2: then Try to install the Composer using The Following Command

curl -sS https://getcomposer.org/installer | php 
like image 115
Sunil KV Avatar answered Sep 24 '22 00:09

Sunil KV