November 24, 2024, 09:36:11 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: error while loading shared libraries:libexpat.so.0:cannot load shared object fil  (Read 15658 times)

Offline carobee

  • Linux Noob !
  • *
  • Posts: 22
hi

Im trying to install apace in lineo embedded linux.I had earlier installed both apache and php in my linux box, so i took the tar file of  binaries of both apache and php aand then untar it in my lineo embedded linux.
But when i tried to start the apache server im getting this error.
"error while loading shared libraries:libexpat.so.0:cannot load shared object file.No such file or directory"

any help will be great.

carobee

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
I think that one is used for xml stuff, you first look if it is really there in your system or not.. or its path is not correctly set !

Offline carobee

  • Linux Noob !
  • *
  • Posts: 22
the problem i think is that i have built apache as DSO so while building the dynamic libraries are built in /usr/lib dir. what i have done is i have taken the libraries of lineo embedded and merged them with the libraries in my linux box. now i think i will have to built apache and php again giving the path as the copied libraries of the lineo embedded.

Is my approach correct? if correct my problem is that im not able to direct the built to that libraries.

its urgent.please help

Offline carobee

  • Linux Noob !
  • *
  • Posts: 22
hi there

Can anyone give the steps to port APACHE and PHP compiled statically in RHEL  to Lineo embedix linux?

any help will be great

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
Hmm, First of all try to run httpd/apache service as root, if then also it fails, then it seems that problem lies on library file called expat, I have searched and found that when you build/install/configure apache , the expat library come it by default...., but sometimes it takes the external expat library and try to compile/build your apache with that , so your system is not able to distinguish between "expat with apache " and "external expat", so it throw these type of message.

Try one thing configure your apache with "--disable-external-expat" option and then try to run the httpd/apache service with root and then see what happens....

Go to respective http/apache dir and perform these steps:
#make clean
#./configure "--disable-external-expat"

And then follow usual steps i.e make, make install etc

Let me know after this.......

Thanks
Gaurav



« Last Edit: July 26, 2007, 01:46:37 PM by gauravbajaj »

Offline carobee

  • Linux Noob !
  • *
  • Posts: 22
what i did was,before the configure  command i took the libraries of lineo and stored it in RHEL. i then ran the export command
"export LDFLAGS="-static -L/path to lineo libraries"
./configure
make
make install"

then i ported the apache to lineo.
now  when starting httpd in lineo gives segmentation fault

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
Try to configure it with option which i wrote earlier  i.e with "--disable-external-expat"
#make clean
#./configure "--disable-external-expat"
#make
#make install

Restart apache/httpd service and then let me know
« Last Edit: July 27, 2007, 09:31:54 AM by gauravbajaj »

Offline carobee

  • Linux Noob !
  • *
  • Posts: 22
When i use that option it says

"configure:Error: invalid option '--disable-external-expat'

i used
./configure --prefix=/usr/local/apache --exec-prefix=/usr/local/apache "--disable-external-expat"

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
ok

First of all  run following command , it will show all the options with configure

#./configure --help


I m not sure but I think it somewhat like "--disable-external-expat", so search it there in configure command help , if its there then  don't put double quotes around that option i.e use

#./configure --prefix=/usr/local/apache --exec-prefix=/usr/local/apache --disable-external-expat

Let me know after that

Thanks
Gaurav
« Last Edit: July 27, 2007, 09:50:01 AM by gauravbajaj »

Offline carobee

  • Linux Noob !
  • *
  • Posts: 22
i have tried out without giving quotes, but it gives an error.

Offline carobee

  • Linux Noob !
  • *
  • Posts: 22
dont i need to take the libraries of lineo under consideration while compiling apache in RHEL.Because i can only port the binaries in lineo.