I'm willing to install phpunit 5.3 with MAMP 1.9 and there for I need to upgrade PEAR to version 1.9.1. The current version installed is 1.9.0.
When I try the to upgrade I get the following:
sudo pear channel-update pear.php.net
sudo pear upgrade pear
Could not get contents of package "/Applications/MAMP/bin/php5.3/bin/pear". Invalid tgz file.
upgrade failed
When I force the upgrade It still doesn't work:
sudo pear upgrade --force PEAR
downloading PEAR-1.9.1.tgz ...
Starting to download PEAR-1.9.1.tgz (293,587 bytes)
.............................................................done: 293,587 bytes
upgrade ok: channel://pear.php.net/PEAR-1.9.1
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"
sudo pear -V
PEAR Version: 1.9.0
As bindbn suggested:
sudo pear install --offline /Users/tom/Downloads/PEAR-1.9.1.tgz
Ignoring installed package pear/PEAR
Nothing to install
sudo pear upgrade --force --alldeps PEAR
downloading PEAR-1.9.1.tgz ...
Starting to download PEAR-1.9.1.tgz (293,587 bytes)
.............................................................done: 293,587 bytes
upgrade ok: channel://pear.php.net/PEAR-1.9.1
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"
pear -V
PEAR Version: 1.9.0
I hope someone can figure this out! Thanks!
I had the same problem. You must reconfigure it to find the PEAR packages.
Replace the php version of Mac OS X by that of MAMP
Configuring PEAR :
Modify the following keys to point to the folder in /Applications/MAMP/bin/php5.3/lib/php
Updating the channel :
Upgrading PEAR :
Try:
or
After many hours of findling. My PEAR keys were pointing to php 5 instead of php 5.2 which is the php version that is in my path.
As said above, list the pear keys with
And then set the keys
Making sure that 5.x is the php version you are using. To find out what your php version is
Now if I can only get the php unit test to install * sigh *
I'm trying to install phpunit for MAMP, so here are the steps I took (after following the tutorial linked above).
In your web browser, open: http://pear.php.net/go-pear
save code to /Applications/MAMP/bin/php5.3/go-pear.php
Follow the onscreen prompts, selecting Y when a list of packages to install comes up. You may be shown this message:
Type Y to continue. It should now show:
Press enter and you should be on your way.
Now to make sure you have pear 1.9.1, run
$ pear version
Now you can follow the instructions to install phpunit. When phpunit is installed, it will be placed in /Applications/MAMP/bin/php5.3/PEAR/PHP/