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

痞子三分冷 提交于 2019-12-21 03:48:18

问题


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?


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/11597944/install-oauth-pecl-error-cannot-install-php-dir-for-channel-pecl-php-net-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!