Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to compile OpenCV library on a shared drive on my system. I was able to configure and generate makefiles successfully by using these settings, but when i try to compile I get the following error:

Linking CXX shared library ../../lib/
CMake Error: cmake_symlink_library: System Error: Operation not permitted
CMake Error: cmake_symlink_library: System Error: Operation not permitted
make[2]: *** [lib/] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2

Please help to resolve. I think it may be an issue with the mount flags.

share|improve this question
up vote 3 down vote accepted

This happens, because vfat type filesystems don't support symlinks. Mount flags won't change this situation.

I'm not familiar with CMake, but I suppose you are using some kind of rule in your makefile that is telling CMake to make a symbolic link to lib/, which fails.

share|improve this answer
will it be possible if I ntfs system ? I need a file system which is compatible with windows also. – bubble Jan 4 '13 at 9:43
Well, try to mount your ntfs drive, then create a file inside and then execute the following command in your terminal: ln -s /path-to-ntfs-drive/name-of-file /path-to-ntfs-drive/symlink-name. If this works without an error, then I suppose you will be able to run CMake on ntfs drive. If you get an error, then verify that your drive is mounted via ntfs-3g driver (mount will say that type is fuseblk). – bender Jan 4 '13 at 12:27

I ran into the same problem, because I was running on a virtual box instantiation of ubuntu (guest), but running in a shared folder to my mac (host).

Because symlinks are different on the mac, cmake failed. Moving the build directory to a ubuntu only folder (not shared with the mac) solved the problem.

Moral of the story- don't build in shared folders that cross platforms.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.