Recently while restarting lampp server I got following error, which is used to work previously:
cat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
Starting XAMPP for Linux ...
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
XAMPP for Linux started.
To resolve this issue I read some forums, tried some solutions. After struggling couple hours I got the solution.
Following is the solution that worked for me:
Open lampp file in your server and search for the line redhat-release.
Most probably you can find this at line number 50 in laamp script, it should looks like following:
if egrep "Fedora" /etc/redhat-release > /dev/null
For CentOS we need to replace Fedora with CentOS, after changing like looks like following:
if egrep "CentOS" /etc/redhat-release > /dev/null
After making above changes try to start lampp with following and it should work without any issue.
$ /opt/lampp/lampp start or ./lampp start
where /opt/lampp is root directory of lampp server.
-Sany
Thanks great
Thank you too much. You saved my life.
Thanks for reading my post and commenting 🙂
Awsome! I had to disable selinux and relabel too … (scratches head) … But thanks a million!
Myron,
Thanks for comment 🙂
Thank you very much, it seems some CentOS updates cause this error.
I edited the file and it runs ok.
Oriol, Thanks for update.
Pingback: Fedora or Tikanga ? | Not so many...
Thanks a lot, it solved my problem on Centos 🙂
Mooder,
Thanks for comment 🙂
Hi guys,
It didn’t work for me 😦
if egrep “CentOS” /etc/redhat-release > /dev/null
When I try to start we receive the same error above, I am using Red HAT.
I changed to Red Hat it seems work now. Thanks,
In a system when the /etc/redhat-release is
“Red Hat Enterprise Linux Server release 5.3”, the same lampp works
but in a system when the /etc/redhat-release is
“Red Hat Enterprise Linux Server release 5.9”, the same lampp does not work
this sets the osguess value as rh9 .
SInce this was an issue, I have changed the redhat-release temporarily to non 5.9 value
Can I know what is the purpose of egrep egrep ‘9 ‘ /etc/redhat-release?
Hi Sarvanan,
I am not sure about exact reason, but wile reading couple forums people are suggested to use this trick and its worked for me, so thought to share it.
The only clue I got to know is while updating/installing this file may get updated. So people are suggesting to revert it back.
“/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory”
Had the same issue as Denis on Red Hat, but I changed line 50:
[if egrep “Fedora” /etc/redhat-release > /dev/null]
to
[if egrep “Red” /etc/redhat-release > /dev/null]
and it works fine.
Thanks for the update.
Thanks!!!
I’ve same problem for 3~4 days. This solves my stressful issue.
That’s grate and thanks for the comment Gray 🙂
great! you saved me hours to solve this problems… Thank you very much
Many thanks .. work for me 🙂
Thanks ………….
Mil Gracias. Funciona.
Perfect, it really helps! Thank you.
Thanks for comment 🙂
Thanks for this post!
I had the problem with Fedora 19. I had to change “9 ” to “fedora” and then xampp worked.
thanks a lot!
saving my day!
Where do i locate the file in the first place? Forgive me, i am new to Linux