Roshan Book

My Tech Notebook

How to install an updated version of PEAR / PHPUnit on Ubuntu?

First, install PEAR.

sudo apt-get install php-pear 

Next, tell PEAR to update its own channel.

sudo pear channel-update 

Then, tell PEAR to upgrade itself to the newest version.

sudo pear upgrade-all 

You should now have the newest version of PEAR installed.

To install PHPUnit, let PEAR know where to find PHPUnit.

sudo pear channel-discover 

Then install PHPUnit. (the -a makes sure all dependency packages are also installed)

sudo pear install -a phpunit/PHPUnit 


According to the latest PHPUnit installation documentation, you can install PHPUnit with the following commands (make sure you have updated PEAR first):

pear config-set auto_discover 1 pear install

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: