4

Trying to integrate a PHP application with Quickbooks and the Quickbooks SDK says it needs PECL Oauth.

I have Ubuntu 14.04 and get this error when I try to install Oauth.

sudo pecl install oauth
downloading oauth-1.2.3.tgz ...
Starting to download oauth-1.2.3.tgz (45,531 bytes)
.............done: 45,531 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-  download/oauth-1.2.3.tgz"
Download of "pecl/oauth" succeeded, but it is not a valid package archive
Error: cannot download "pecl/oauth"
Download failed 
install failed

I Googled a bit and updated my system:

sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install php-pear php5-dev

but no luck there. Any ideas - this should be an easy step for Ubuntu.

3 Answers 3

17
sudo apt-get install php5-oauth
4
  • 2
    Worked for php 7 : sudo apt-get install php7.1-oauth
    – vijay
    Feb 23, 2017 at 6:38
  • 1
    sudo apt-get install php-oauth will choose the right version for you.
    – Juampy NR
    Jul 5, 2017 at 7:19
  • ... and sudo systemctl reload apache2
    – aalaap
    Oct 12, 2017 at 6:18
  • 1
    sudo apt-get install php7.0-oauth for php 7. You should explicitly say which PHP version to use in case you have multiple PHPs Nov 11, 2017 at 17:33
3

I am also using the QuickBooks API and for PHP 7 this worked for me on Ubuntu 14.04.3 LTS

sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install php-pear php7.0-dev
sudo pecl install oauth

Then add to your php.ini

extension=oauth.so
0

Maybe this resolve the problem:

sudo pecl install oauth-1.2.3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.