Author Topic: error while loading shared libraries : libQtCore.so.4 ?!?!?  (Read 37040 times)

Offline rv2931

  • Multiple posting newcomer
  • *
  • Posts: 13
error while loading shared libraries : libQtCore.so.4 ?!?!?
« on: February 05, 2009, 10:30:03 pm »
Hello,

I've just installed Code::Blocks 8.02 on my Ubuntu 8.04 and I thought that I installed it like previous installation but this time, when I compile the Qt demo "Quit button" project, no errors, but when I execute, I've this error message :
"error while loading shared libraries: libQtCore.so.4: cannot open shared object file: No such file or directory"
 :(
I don't really understand cause during the installation, it ask to give the root path of Qt, thing that I've done
/usr/local/Trolltech/Qt-4.4.3
I can't give any other path cause it is searching for libQtCore. So here it founds it. But during execution, it does not. Why ?
I really don't understand. I don't know how to return to the isntallation window where the Qt root path, include, libs.... are configured ? Where it is ?

thanks for help

RV
« Last Edit: February 13, 2009, 09:50:27 am by rv2931 »

Offline rv2931

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: error while loading chared libraries : libQtCore.so.4 ?!?!?
« Reply #1 on: February 11, 2009, 05:54:21 pm »
Up !
I really have a problem, and I don't find the solution. I have reconfigured all linkers, with absolute path, tried all path possibilities for search directories and it doesn't work... :o(
the compilation gives no error but it fails at the beginning ef the execution

/home/my_script_path: error while loading shared librairies: libQtCore.so.4: cannot open shared object file: No such file or directory

My Linker pathes are :
/usr/local/Trolltech/Qt-4.4.3/lib/libQtCore.so & /usr/local/Trolltech/Qt-4.4.3/lib/libQtGui.so

and my codeis just the demo code created automaticaly by Code::Blocks for Qt4 projects.

 :? :( :? :( :?
thanks

RV

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: error while loading chared libraries : libQtCore.so.4 ?!?!?
« Reply #2 on: February 11, 2009, 06:46:31 pm »
You probably have a dead link from "libQtCore.so" to "libQtCore.so.4" in a standard lib directory.

If that's the case remove it and try again.

If it still does not run,this wiki-article might help you.

It's about C::B not finding it's libs, if not in systems standard directory, but the same can happen for any other application.

Instead of "/usr/local/lib" you will most likely need to use "/usr/local/Trolltech/Qt-4.4.3/lib".
« Last Edit: February 13, 2009, 10:10:21 am by jens »

Offline rv2931

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: error while loading chared libraries : libQtCore.so.4 ?!?!?
« Reply #3 on: February 13, 2009, 09:48:59 am »
You were right.
I added a file Qt.so.conf in the /etc/ldcon.so.d/ directory in whih one I added the lines :
Code
# Qt librairies directory
/usr/local/Trolltech/Qt-4.4.3/lib

Then I laucnh the comand : sudo ldconfig
and my project works now.
Great thanks

RV