[英]Installing Google Adwords Api Library (using docker)
有關安裝該庫的Google文檔,請參見: https : //github.com/googleads/googleads-php-lib/blob/master/README.md#getting-started ,它指示我們復制adsapi_php.ini
,如下所示: https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/adsapi_php.ini到您的主目錄。
我在.ini中填寫了必要的變量,並且我使用的是docker,所以我將此文件放置在了/ var / www / home / node /的容器中,並且在運行命令composer require googleads/googleads-php-lib
在命令提示符下,出現以下錯誤:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for googleads/googleads-php-lib ^37.1 -> satisfiable by googleads/googleads-php-lib[37.1.0].
- googleads/googleads-php-lib 37.1.0 requires ext-soap * -> the requested PHP extension soap is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/php.ini
- /usr/local/etc/php/conf.d/adsapi_php.ini
- /usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini
- /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
- /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
我以為問題是我的adsapi_php.ini只是放在錯誤的位置,因為它包含避免上述問題的必要條件,但是我嘗試將其放置在幾個不同的位置,但始終會遇到相同的錯誤。
任何幫助,將不勝感激!
只需嘗試在docker內部編輯php.ini(docker exec -t {container} bashand啟用擴展肥皂)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.