hi all,
i m currently working in fedora n opencv.i m able to compile sample codes which are in c and generate executable from them i m reffering i did all steps correctly with no errors still i m getting "error while loading shared libraries: libcv.so.1: cannot open shared object file: No such file or directory" i have tried many options like exporting libraries setting paths ,i don't know where i m doing wrong pls help me out there it's urgent reply fast.....


thnxx in advance....

Dani AI

Generated

Two separate problems appear in the thread and should be treated independently. The runtime message about “libcv.so.1: cannot open shared object file” means the dynamic loader cannot find the OpenCV shared library at program start. The “The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support” error (from cvNamedWindow) means the highgui GUI backend was not built into OpenCV. ’s comment about mismatched install prefixes is a common root cause; lism’s suggestion to register the library path with the dynamic linker is one usual remedy, but further verification is useful before changing system config.

Quick diagnostic checklist (run on the machine where the executable fails):

find / -name 'libcv.so*' 2>/dev/null
ldd ./my-opencv-prgm
readelf -d ./my-opencv-prgm | grep -i 'RUNPATH\|RPATH'
readelf -a /path/to/libcv.so.* | grep SONAME

Interpretation notes:

  • find locates any installed libcv files. If none exist, OpenCV wasn’t installed where intended.
  • ldd shows which shared libraries the executable actually tries to load and which are “not found.”
  • readelf reveals embedded runpath/rpath and the library SONAME; mismatched SONAME vs. filenames is a practical gotcha.

Fix guidance (concise):

  • Prefer installing OpenCV and its dependencies from the Fedora packages (package manager) rather than piecemeal source installs. If building from source is required, install the GUI and image-format development packages first (GTK development headers plus JPEG/PNG/TIFF/Jasper dev packages), then do a clean rebuild so the highgui module is compiled.
  • If the library files exist but are not being picked up, either install them into a system library directory or register the custom lib directory with the runtime linker, or rebuild the program with an embedded runpath that points to the install libdir. Ensure versioned symlinks match the SONAME (for example the .so.N pointing to the actual file).

Caution: avoid mixing multiple OpenCV installs and check the configure/build output carefully to confirm GTK/highgui detection before running GUI samples.

Recommended Answers

All 12 Replies

Your OpenCV and your libcv aren't installed in the same path. If you compile libcv from source, using ./configure --prefix=SAME_PATH_AS_OPENCV will fix this.

hay thnxx....i did samething but it's giving me same error.....

error while loading shared libraries: libcv.so.1: cannot open shared object file: No such file or directory

how to ressolve this????

pls reply fast....

Well, where did you install libcv and where did you install OpenCV?

i did this,

1> tar xvzf OpenCV-1.0.0.
cd opencv-1.0.0

2>./configure --prefix=/opencv_library_install_path/opencv-1.0.0
make;
3>make install
4>Libraries have been installed in:
/opencv_library_install_path/opencv-1.0.0/lib
5>ln -s opencv-1.0.0 opencv
5>cd /.../opencv-1.0.0/
make check
i donn know where i m getting wrong????
after this i have compiled my program like below,
1>cd /where/you/have/the/source/code
PKG_CONFIG_PATH=/where/you/have/installed/opencv/lib/pkgconfig:${PKG_CONFIG_PATH}
export PKG_CONFIG_PATH
2>pkg-config --cflags opencv
pkg-config --libs opencv
3>gcc `pkg-config --cflags opencv` `pkg-config --libs opencv` -o my-opencv-prgm my-opencv-prgm.c

even then i m getting same error so wat to do ,can you give me the procedure for running sample code in c or tell me where i m getting wrong.

i did this,

1> tar xvzf OpenCV-1.0.0.
cd opencv-1.0.0

2>./configure --prefix=/opencv_library_install_path/opencv-1.0.0
make;
3>make install
4>Libraries have been installed in:
/opencv_library_install_path/opencv-1.0.0/lib
5>ln -s opencv-1.0.0 opencv
5>cd /.../opencv-1.0.0/
make check
i donn know where i m getting wrong????
after this i have compiled my program like below,
1>cd /where/you/have/the/source/code
PKG_CONFIG_PATH=/where/you/have/installed/opencv/lib/pkgconfig:${PKG_CONFIG_PATH}
export PKG_CONFIG_PATH
2>pkg-config --cflags opencv
pkg-config --libs opencv
3>gcc `pkg-config --cflags opencv` `pkg-config --libs opencv` -o my-opencv-prgm my-opencv-prgm.c

even then i m getting same error so wat to do ,can you give me the procedure for running sample code in c or tell me where i m getting wrong.

2>./configure --prefix=/opencv_library_install_path/opencv-1.0.0

Did you install libcv separately, or is it a part of this? You need to install both of them to the same path.

what is libcv and where should it located? can u tell me whole procedure from start to end how to execute sample programs in c in opencv????

pls it's urgent help me out, here i m stuck

thnxx in advance

I have no personal experience with OpenCV. But, you should compile/install OpenCV with the command ./configure --prefix=/usr Or wait until John A comes in here and destroys my tiny amount of knowledge in Linux with his far superior amount.

OpenCV ERROR: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support)
in function cvNamedWindow, window.cpp(71)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...


i m able to run mushroom.cpp and letter_recog.cpp but for others i m getting above errors so how to resolve above errors????


pls help me out there......

waiting for ur reply .....


thnxx in advance.

OpenCV ERROR: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support)
in function cvNamedWindow, window.cpp(71)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...


i m able to run mushroom.cpp and letter_recog.cpp but for others i m getting above errors so how to resolve above errors????


pls help me out there......

waiting for ur reply .....


thnxx in advance.

I found same problem.

you must add your opencv path to folder /etc/ld.so.conf.d/ by create some file relate to opencv. for example

opencv_path.conf
(details in this file are)
/usr/local/lib
/usr/local/include
(both of above are default path of opencv installation)

then save file and mv or copy opencv_path.conf file to /etc/ld.so.conf.d and run "ldconfig" command again.

goodluck

Hi.. I am not able to install GTK+ 2.x. It configures correctly but when i type make command , it gives error " No target specified and no makefile found". Plz reply..

Why don't you install it through your package manager?

can u tel me where i can find libjasper pkg and how to install that pkg????

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.