I want to run a code that uses javaCV on hadoop-1.0.1.
I have the following includes in my program:
import static com.googlecode.javacv.cpp.opencv_core.*; import static com.googlecode.javacv.cpp.opencv_imgproc.*; import static com.googlecode.javacv.cpp.opencv_highgui.*; import com.googlecode.javacpp.BytePointer;
In hadoop-1.0.1/lib I put this jar files:
javacpp.jar javacv.jar, javacv-linux-x86_64.jar, javacv-linux-x86.jar, opencv-2.4.5-linux-x86_64.jar, opencv-2.4.5-linux-x86.jar
However when I run the application I get this:
13/09/10 20:26:17 INFO mapred.JobClient: Task Id : attempt_201309102025_0001_m_000000_0, Status : FAILED Error: java.lang.UnsatisfiedLinkError: /tmp/hadoop-huser/mapred/local/taskTracker/huser/jobcache/job_201309102025_0001/attempt_201309102025_0001_m_000000_0/work/tmp/javacpp7385313349525/libopencv_core.so.2.4: libtbb.so: cannot open shared object file: No such file or directory
Does anyone has any idea how I can make javaCV to work on hadoop. Beside having the jar files in $HADOOP_HOME/lib do I have to do anithing else?
You need to install the required package for openCV. Here is an article to introduce how to install openCV: http://www.samontab.com/web/2012/06/installing-opencv-2-4-1-ubuntu-12-04-lts/
What you need is the following command:
sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev
I assume you are using Ubuntu.