Google Cloud Platform 一键部署失败:`xslt-config: not found`

Google Cloud Platform Push-To-Deploy fails: `xslt-config: not found`

我正在尝试为我的应用引擎应用程序之一设置 Google 云平台的 push-to-deploy。为了执行我的单元测试,我需要安装 lxml。这需要构建机器安装了 libxml2 和 libxslt 的开发包。我通过 ssh 连接到计算虚拟机并安装了这些软件包,但它仍然失败。我假设节点 Python: cloud-dev-python 是另一台机器,我无权访问它来安装这些软件包。

有没有人处理过这个问题?

Started by user User Name
Building remotely on cloud-dev-python in workspace /var/jenkins/workspace/JoshTesting
 > git rev-parse --is-inside-work-tree # timeout=10
...snip...
Installing app_lib.
Getting distribution for 'lxml==2.3.5'.
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
Building lxml version 2.3.5.
Building without Cython.
ERROR: /bin/sh: 1: xslt-config: not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt 
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
An error occurred when trying to install lxml 2.3.5. Look above this message for any errors that were output by easy_install.
While:
  Installing app_lib.
  Getting distribution for 'lxml==2.3.5'.
Error: Couldn't install: lxml 2.3.5
+ echo Buildout failed. Check the logs and try again...
Buildout failed. Check the logs and try again...
+ exit 1
Build step 'Execute shell' marked build as failure
Finished: FAILURE

我绕弯子解决了

Google 的 VM 使用 docker 来容纳一些构建执行器,所以我需要连接到 cloud-dev-python 实例并使用 [=12= 在其上安装一些包].

我通过 ssh 连接到主机 VM 并执行了以下命令:

root@bitnami-jenkins$ CONTAINER_ID=$(docker ps | grep cloud-dev-python | awk '{print }')
root@bitnami-jenkins$ sudo docker exec -i -t $CONTAINER_ID bash
root@<container id>:/$ apt-get update && apt-get -y upgrade && apt-get install -y build-essential libz-dev libxml2-dev libxslt1-dev python-dev