How to install the PHP OAuth Extension on Amazon Linux

Tomaso Albinoni asked:

In order to connect to QuickBooks from my PHP application, I need to install OAuth. I was following these instructions (substituting yum for apt-get) but after the first line

sudo yum install gcc make autoconf libc-dev pkg-config I see:

No package libc-dev available.
No package pkg-config available.

Are there Amazon Linux compatible equivalents for these packages? How should I proceed?

EDIT: After running sudo yum install php-pecl-oauth I see:

Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
—> Running transaction check
 > Package php-pecl-oauth.x86_64 0:1.2.2-3.3.amznl will be installed
—> Processing Dependency: php(api) = 20090626-x86-64 for package: php-pecl-oaut
—> Processing Dependency: php(zend-abi) = 20090626-x86-64 for package: php-pecl
—> Running transaction check
 > Package php-common.x86_64 0:5.3.29-1.8.amznl will be installed
—> Processing Conflict: php56-common-5.6.14-1.119.amznl.x86_64 conflicts php-co
mmon < 5.5.22-1.98
—> Finished Dependency Resolution
Error: php56-common conflicts with php-common-5.3.29-1.8.amznl.x86_64
You could try using —skip-broken to work around the problem
You could try running: rpm -Va —nofiles —nodigest

My answer:

Those instructions aren’t for Amazon Linux. You should not expect them to work.

And in any case, most yum-using distributions already have php-oauth packaged, so you don’t need to do any of that. On Amazon Linux, the package name is php-pecl-oauth.

yum install php-pecl-oauth

And Bob’s your uncle.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.