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

后端 未结 3 1479
轮回少年
轮回少年 2021-02-12 20:12

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

相关标签:
3条回答
  • 2021-02-12 20:47

    For further references, on OS Catalina, due to write permission on /usr/bin - lib folders, you should move all config folders on pecl to some writable location (except php_bin which is php directory, this one should point to your php folder).

    0 讨论(0)
  • 2021-02-12 20:54

    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

    0 讨论(0)
  • 2021-02-12 20:57

    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.

    0 讨论(0)
提交回复
热议问题