I'm trying to install OpenCV2 and the process requires the use of cmake which 
I'm not familiar with so I was hoping I could ask the cmake mailing list for 
some advice.

I have a virtual machine where I have sudo permissions and I download the 
OpenCV2 zip file from, create a directory for the build and run the following 
commands in my Bash terminal


cd build
cmake -D CUDA_ARCH_BIN=3.2 -D CUDA_ARCH_PTX=3.2 -D CMAKE_BUILD_TYPE=RELEASE -D 
CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON 
-D WITH_V4L=ON -D BUILD_TIFF=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
make -j$(nproc)
sudo make install

When I run sudo make install I get the error
/bin/sh: 1: cd: can't cd to 
/home/michael.obrien/setups/OpenCV/opencv-2.4.13/build
make[2]: *** [3rdparty/libtiff/CMakeFiles/libtiff.dir/depend] Error 2
make[1]: *** [3rdparty/libtiff/CMakeFiles/libtiff.dir/all] Error 2
make: *** [all] Error 2

If I run the command make install the build will complete but I get an error 
"CMake Error at cmake_install.cmake:36 (FILE): file cannot create directory 
/usr/local/include/opencv2. Maybe need administrative privileges

So I'm confused as to how I can resolve this if sudo can't cd to the folder but 
I need su(do) to create the directories

Any pointers on how to solve this would be very welcome.

Michael



ITB Email Disclaimer This is a confidential communication and is intended only 
for the addressee indicated in the message (or duly authorised to be 
responsible for the delivery of the message to such person). You are 
specifically prohibited from copying this message or delivering the same, or 
any part thereof, to any other person, whomsoever or howsoever, unless you 
receive written authorisation from us to do. If you are anyone other than the 
intended addressee, or person duly authorised and responsible for the delivery 
of this message to the intended addressee, you should destroy this message and 
notify us immediately.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to