Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting strange error while installing AWS SDK via PEAR

I am getting this error while installing AWS SDK via PEAR. I never got this before.

$ sudo pear channel-discover pear.amazonwebservices.com
Adding Channel "pear.amazonwebservices.com" succeeded
Discovery of channel "pear.amazonwebservices.com" succeeded    
$ sudo pear install aws/sdk
Unknown remote channel: guzzlephp.org/pear
aws/sdk requires package "channel://guzzlephp.org/pear/Guzzle" (version >= 3.0.2)
No valid packages found
install failed

Can somebody give me a hand.

like image 214
Naveed Avatar asked Nov 24 '12 20:11

Naveed


4 Answers

Taken from here: https://github.com/aws/aws-sdk-php/blob/master/README.md#installing-via-pear

Installing via PEAR

PEAR, which stands for PHP Extension and Application Repository, is a framework and distribution system for reusable PHP components. It is the PHP equivalent of other package management solutions like Yum that install packages system-wide.

PEAR packages are easy to install, and are available in your PHP environment path so that they are accessible to any PHP project. PEAR packages are not specific to your project, but rather to the machine they're installed on.

From the command-line, you can install the SDK with PEAR as follows. Note: You may need to use sudo for the following command.

pear -D auto_discover=1 install pear.amazonwebservices.com/sdk

Once the SDK has been installed via PEAR, you can load the phar into your project with:

require 'AWSSDKforPHP/aws.phar';
like image 172
Jeremy Avatar answered Nov 15 '22 20:11

Jeremy


Had the same problem, but this fixed it:

Install the old package first

sudo pear -D auto_discover=1  install pear.amazonwebservices.com/sdk-1.6.0

Then update it

sudo pear install pear.amazonwebservices.com/sdk

To check:

ubuntu@ip-xx-xx-xx:~$ sudo pear install aws/sdk
aws/sdk is already installed and is the same as the released version 2.4.0
like image 32
George Avatar answered Nov 15 '22 22:11

George


Try this before installing the SDK:

sudo pear install --alldeps --force guzzle/guzzle
like image 38
xENo Avatar answered Nov 15 '22 20:11

xENo


well I ended up installing the old package (I didn't need the new stuff such as glacier etc)

pear install aws/sdk-1.5.17.1

like image 22
Nitin Avatar answered Nov 15 '22 21:11

Nitin