AWS Opswork Chef Fatal Error - amazon-web-services

We are trying to install python using OpsWork. Installation happens correct but in the end we get the message:
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)
What can we be doing wrong?
Final Snippets of the output is below:
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)

I've had that error happen before.
Solution 1 - I needed to upgrade make tools. Also needed to ensure that the python wasn't already installed.
Solution 2 - ( horrible one ) Also if all things fail, simply add the line into the BASH stanza:
bash "install python...." do
..
ignore_failure true
..
end

Related

{Yocto} "opkg_install_cmd: Cannot install package <package_name>." Errors

I am working with YOCTO project and running into the problem that made the build progress fail. The failure was at a last task do_rootfs
Below is the error log:
ERROR: Unable to install packages. Command '/home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/tmp/sysroots/x86_64-linux/usr/bin/opkg-cl -f /home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/tmp/work/iwg21m-poky-linux-gnueabi/core-image-weston/1.0-r0/opkg.conf -o /home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/tmp/work/iwg21m-poky-linux-gnueabi/core-image-weston/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version install locale-base-en-us locale-base-en-gb' returned 255:
Unknown package 'locale-base-en-us'.
Unknown package 'locale-base-en-gb'.
Collected errors:
* opkg_install_cmd: Cannot install package locale-base-en-us.
* opkg_install_cmd: Cannot install package locale-base-en-gb.
ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/tmp/work/iwg21m-poky-linux-gnueabi/core-image-weston/1.0-r0/temp/log.do_rootfs.31252
ERROR: Task 7 (/home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/../poky/meta/recipes-graphics/images/core-image-weston.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5097 tasks of which 5096 didn't need to be rerun and 1 failed.
No currently running tasks (5096 of 5098)
Summary: 1 task failed:
/home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/../poky/meta/recipes-graphics/images/core-image-weston.bb, do_rootfs
If you guys already run into this problem also, kindly support me how to fix this.
Thanks.

Compile Medooze - Ubuntu 14.04

I`m trying to install Medooze but I faced with lots of problem!
I followed step by step by this instruction http://www.medooze.com/products/media-mixer-server/installation.aspx
most of them installed with out error until step 9. when I use "make" there are bunch of errors, I fixed many of them but when I trying to fix this one, I cant.
/usr/local/src/medooze/mcu/src/gsm/gsm.h:34:32: fatal error: GSM3CircularBuffer.h: No such file or directory
#include
GSM3CircularBuffer.h>
compilation terminated.
make: *** [audio.o] Error 1
I was trying to make this file manually but it doesnt work.
Do you have any suggestion?
Update:
I solved it by downloading libgsm1-dev in /usr/local/src/ path
but now I see this error:
In file included from /usr/local/src/medooze/mcu/src/cef/Browser.h:11:0,
from test/cef.cpp:2:
/usr/local/src/medooze/mcu/src/cef/include/cef_app.h:42:30: fatal error: include/cef_base.h: No such file or directory
#include "include/cef_base.h"
^
compilation terminated.
make: *** [test/cef.o] Error 1

Can't install C:\Devkit>gem install json --platform=ruby on Windows 10

I keep getting this same error message:
C:\Devkit>gem install json --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
D:/Ruby22/bin/ruby.exe -r ./siteconf20150813-3104-1rfxe1t.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating generator-i386-mingw32.def
compiling generator.c
In file included from d:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:111:14: error: size of array 'ruby_chec
k_sizeof_voidp' is negative
In file included from d:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function ' rb_obj_freeze_inline':
d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1156:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1157:2: warning: cast to pointer from i
nteger of different size [-Wint-to-pointer-cast]
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in D:/Ruby22/lib/ruby/gems/2.2.0/gems/json- 1.8.3
for inspection.
Results logged to D:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86- mingw32/2.2.0/jso
n-1.8.3/gem_make.out
There was a bunch more warnings about the casting to pointer from int. This is also not allowing my 'bundle install' either. I don't know what to change. I got the correct version of Devkit downloaded.

Error while building ghostscript on linux

I'm trying to build Ghostscript (v 9.06) on my hosted linux box so I can manipulate PDF files.
Everything was going fine with ./configure and make, but then I got the following error:
../gs/base/x_.h:135:29: error: X11/Intrinsic.h: No such file or directory
After which I got a list of errors with funny â characters, looking like this:
../gs/base/gdevx.c:1138: error: âgx_device_Xâ has no member named âtextâ
What's the problem here, and what's the fix? I thought it was a symlink problem, so I checked where my X11 directory was and ran the following command:
ln -s X11 /usr/include/X11
I ran make again but no difference. Any ideas?
Edit
Here are the first few lines of the errors... the rest are all pretty much the same:
../gs/base/x_.h:135:29: error: X11/Intrinsic.h: No such file or directory
../gs/base/x_.h:136:30: error: X11/StringDefs.h: No such file or directory
../gs/base/x_.h:137:25: error: X11/Shell.h: No such file or directory
In file included from ../gs/base/gdevx.c:33:
../gs/base/gdevx.h:30: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âgdev_x_resourcesâ
../gs/base/gdevx.h:32: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âgdev_x_fallback_resourcesâ
../gs/base/gdevx.h:119: error: expected specifier-qualifier-list before âPixelâ
../gs/base/gdevx.c:217: warning: excess elements in struct initializer
../gs/base/gdevx.c:217: warning: (near initialization for âgs_x11_deviceâ)
../gs/base/gdevx.c:217: warning: excess elements in struct initializer
../gs/base/gdevx.c:217: warning: (near initialization for âgs_x11_deviceâ)
../gs/base/gdevx.c:217: error: extra brace group at end of initializer
../gs/base/gdevx.c:217: error: (near initialization for âgs_x11_deviceâ)
And the last few lines are:
make[2]: *** [obj/gdevx.o] Error 1
make[2]: Leaving directory `/root/ghostpdl-9.06/main'
make[1]: *** [pdl-product] Error 2
make[1]: Leaving directory `/root/ghostpdl-9.06/main'
make: *** [pcl] Error 2
It turned out I just didn't have the X package installed properly.
I ran
yum provides \*/Intrinsic.h
yum provides \*/StringDefs.h
yum provides \*/Shell.h
to find out where to get these files, and got
libXt-devel-1.0.7-1.el6.x86_64 : X.Org X11
for each of them. So I installed it:
yum install libXt-devel
then went back to my ghostscript directory, ran make, ./configure and make again, and voila. It worked out.
For Ubuntu users
sudo apt-get install libxt-dev libxaw7-dev
You don't need X11 to build Ghostscript, but you need to tell it not to. If you run ./configure --without-x then the GS build will not include anything which relies on X (such as the display device) and won't look for the X libraries.
As long as you don't want to use the X11 or X11a devices that should work.

Error when building OpenCV on my mac: 'Py_ssize_t' issues

I've been following the instructions here: http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port, and have just finished the make -j8 step. Although the make completes to 100%, I am getting errors
make[2]: *** [interfaces/python/CMakeFiles/cvpy.dir/cv.o] Error 1
make[1]: *** [interfaces/python/CMakeFiles/cvpy.dir/all] Error 2
make: *** [all] Error 2
Specific errors I see in the stack trace are all from a file called cv.cpp:
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:18: error: ‘Py_ssize_t’ does not name a type
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:206: error: ‘Py_ssize_t’ does not name a type
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp: In function ‘PyObject* iplimage_tostring(PyObject*, PyObject*)’:
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:282: error: ‘what_size’ was not declared in this scope
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp: In function ‘PyObject* cvmat_tostring(PyObject*, PyObject*)’:
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:425: error: ‘what_size’ was not declared in this scope
(which continues for a long while). I followed all of the steps and am not sure where I am going wrong. Any help for installing open cv on my mac (Snow Leopard)?
Thanks!
I had an old version of python (MacPython was overriding the default python version). Just get rid of MacPython, and you are good to go.
Make sure you have the most recent svn from the repository.
I could not get the tar ball to build but the svn check out built correctly
"https://code.ros.org/svn/opencv/trunk/opencv"
You will also need the OpenCV.framework for xcode to build the app with.
I found this page to have the best info to get openCV working on an Mac
http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port
So far I have only got this to work on an intel based Mac.