Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install oAuth PECL error: Cannot install, php_dir for channel "pecl.php.net" is not writeable by the current user

I'm trying to instal oAuth on OS X, but I am getting this error in the Terminal:

Cannot install, php_dir for channel "pecl.php.net" is not writeable by the current user

How do I allow it to be writable?

like image 305
Steve Chan Avatar asked Jul 22 '12 05:07

Steve Chan


2 Answers

First find out where the php_dir is. You can do this by using the 'config-get' command:

pecl config-get php_dir

After this you can either:

  • Change the ownership of that folder (and any needed child folders)

    sudo chown <username> <php_dir>

or

  • Set the php_dir to a different folder

    pecl config-set php_dir /path/to/new/dir

like image 197
LonnyLot Avatar answered Nov 06 '22 03:11

LonnyLot


The easiest way is probably to append sudo to the front of your install command.

See http://linux.about.com/od/commands/l/blcmdl8_sudo.htm to read more about the handy "super user" command.

like image 45
David Avatar answered Nov 06 '22 01:11

David