gpt4 book ai didi

python - Google Cloud Platform Push-To-Deploy 失败 : `xslt-config: not found`

转载 作者:太空宇宙 更新时间:2023-11-03 17:58:28 24 4
gpt4 key购买 nike

我正在尝试设置 Google Cloud Platform 的 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 的虚拟机使用 docker 来容纳一些构建执行器,因此我需要连接到 cloud-dev-python 实例并使用 apt-get 在其上安装一些软件包>.

我通过 ssh 连接到主机虚拟机并执行以下操作:

root@bitnami-jenkins$ CONTAINER_ID=$(docker ps | grep cloud-dev-python | awk '{print $1}')
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

关于python - Google Cloud Platform Push-To-Deploy 失败 : `xslt-config: not found` ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28118764/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com