5

I'm trying to run:

sudo pecl channel-update pecl.php.net

Because every time I try and install a package it prompts me to run this instead. But when I run those commands I get: "Registry directory is not writeable by the current user" Now this question is very similar but suggests using sudo which I'm already doing. When I run sudo whoami I'm getting root. Could this be related to http://pear.php.net going down?

Community
  • 1
  • 1
wesman16
  • 191
  • 2
  • 10

1 Answers1

6

I had exactly the same problem (on my Mac Book), this is how I solved it:

I did a reinstall of PEAR using the following steps: http://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/

After the installation of PEAR (which is bundled with PECL) my PECL commands did work again.

joeni
  • 151
  • 1
  • 3
  • 3
    i followed the same steps and pear seems to be installed but i get the message: WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update and when i try i get Updating channel "pecl.php.net" Updating Channel "pecl.php.net" in registry failed" – alex Sep 23 '17 at 15:16
  • Note: the linked article uses the http url but now it's working only by using https: `curl -O https://pear.php.net/go-pear.phar`. A blind copy-paste the of command will download a "Moved here..." html file and not the real file. – claudiut Feb 08 '21 at 11:30