1

我们正在尝试使用 OpsWork 安装 python。安装正确,但最后我们得到消息:

Ran "bash" "/tmp/chef-script20140715-9783-k2dw6u" 返回 2 [2014-07-15T10:29:19+00:00] 致命:Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit代码 1)

我们做错了什么?

输出的最终片段如下:

Compiling /usr/local/lib/python2.7/xml/sax/__init__.py ...
Compiling /usr/local/lib/python2.7/xml/sax/_exceptions.py ...
Compiling /usr/local/lib/python2.7/xml/sax/expatreader.py ...
Compiling /usr/local/lib/python2.7/xml/sax/handler.py ...
Compiling /usr/local/lib/python2.7/xml/sax/saxutils.py ...
Compiling /usr/local/lib/python2.7/xml/sax/xmlreader.py ...
Compiling /usr/local/lib/python2.7/xmllib.py ...
Compiling /usr/local/lib/python2.7/xmlrpclib.py ...
Compiling /usr/local/lib/python2.7/zipfile.py ...
STDERR: configure: WARNING:

By default, distutils will build C++ extension modules with "g++".
If this is not intended, then set CXX on the configure command line.

libpython2.7.a(posixmodule.o): In function `posix_tmpnam':
/var/lib/aws/opsworks/cache/Python-2.7.1/./Modules/posixmodule.c:7346: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
libpython2.7.a(posixmodule.o): In function `posix_tempnam':
/var/lib/aws/opsworks/cache/Python-2.7.1/./Modules/posixmodule.c:7301: warning: the use of `tempnam' is dangerous, better use `mkstemp'
*** WARNING: renaming "crypt" since importing it failed: build/lib.linux-x86_64-2.7/crypt.so: undefined symbol: crypt
*** WARNING: renaming "nis" since importing it failed: build/lib.linux-x86_64-2.7/nis.so: undefined symbol: yp_master
*** WARNING: renaming "crypt" since importing it failed: build/lib.linux-x86_64-2.7/crypt.so: undefined symbol: crypt
*** WARNING: renaming "nis" since importing it failed: build/lib.linux-x86_64-2.7/nis.so: undefined symbol: yp_master
make: *** [libinstall] Error 1
---- End output of "bash"  "/tmp/chef-script20140715-9783-k2dw6u" ----
Ran "bash"  "/tmp/chef-script20140715-9783-k2dw6u" returned 2
[2014-07-15T10:29:19+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
4

1 回答 1

0

我以前也发生过这种错误。

解决方案 1 - 我需要升级 make 工具。还需要确保尚未安装 python。

解决方案 2 - (可怕的一个)另外,如果一切都失败了,只需将行添加到 BASH 节中:

bash "install python...." do
  ..
  ignore_failure true
  ..
end
于 2014-07-15T22:04:46.073 回答