[SOLVED] pear.php.net is not writable

terminal

#1

I’m trying to install PEAR on my project, which I have done successfully through apt-get. However, now I’m trying to install the http_request2 PEAR package which is required by an API for WMATA that I’m developing.

Error I’m receiving is this: Cannot install, php_dir for channel “pear.php.net” is not writeable by the current user. I’m guessing it’s just a permissions issue that will require some administrator intervention.

albertlua:~/workspace $ pear install http_request2
Cannot install, php_dir for channel "pear.php.net" is not writeable by the current user
albertlua:~/workspace $ pear install "channel://pear.php.net/http_request2-0.5.2"
Cannot install, php_dir for channel "pear.php.net" is not writeable by the current user
albertlua:~/workspace $

#2

just a simple permission change should do. just set the directory for the project to 777.

chmod 777 some/folder


#3

It was a different issue in the end, turns out I forgot to use the sudo command… duh… :stuck_out_tongue:


#4

The solution to this problem was to to sudo the command, so it would be

albertlua:~/workspace $ sudo pear install http_request2

Taking a quick break creates marvels in realizing quick fixes over simple overlooks.