【问题标题】:unable to use dev_appserver.py to run the local development server on mac无法使用 dev_appserver.py 在 mac 上运行本地开发服务器
【发布时间】:2017-03-05 00:08:50
【问题描述】:

我正在按照谷歌云平台上的教程为hello-world应用程序运行本地服务器,并使用dev_appserver.py命令,但是终端抱怨如下消息:

$ dev_appserver.py .
INFO     2016-10-22 21:59:53,084 devappserver2.py:769] Skipping SDK update check.
INFO     2016-10-22 21:59:53,129 api_server.py:205] Starting API server at: http://localhost:56857
INFO     2016-10-22 21:59:53,133 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO     2016-10-22 21:59:53,137 admin_server.py:116] Starting admin server at: http://localhost:8000
ERROR    2016-10-22 21:59:54,141 php_runtime.py:348] The PHP runtime is not available
Traceback (most recent call last):
  File "/Users/Dale/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 344, in new_instance
    self._check_binaries(php_executable_path, gae_extension_path)
  File "/Users/Dale/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 265, in _check_binaries
    raise _PHPBinaryError('The development server must be started with the '
_PHPBinaryError: The development server must be started with the --php_executable_path flag set to the path of the php-cgi binary.

抱怨是什么意思? php_runtime.py 有什么问题吗?我怎样才能把它弄直?非常感谢。

【问题讨论】:

    标签: php command-line terminal google-cloud-platform localserver


    【解决方案1】:

    如果您使用的是 Mac,则需要运行以下命令:

    gcloud 组件安装 app-engine-php-darwin

    如果您使用的是 Linux,则需要提供 --php_executable_path 作为错误消息状态。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-05-02
      • 2020-03-05
      • 2017-12-27
      • 2015-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多