Error while loading shared libraries

General support questions
Post Reply
shahriar123
Posts: 3
Joined: 2018/08/21 10:33:30

Error while loading shared libraries

Post by shahriar123 » 2018/08/21 10:43:32

Hey guys,

Please help me with, it's driving me crazy!
I am new to Linux (I don't know any thing!) and installed a CentOS 6.8 on a VM Ware workstation 9. I want to install a software in my centOS. Since I don't know anything about installing applications and software in Linux, I am going to use the installation guide document provided by the software itself. it is written that: "Go to DVD mount point. At the system prompt, type ./setup". So, I opened the DVD, there, I opened the terminal and typed ./setup but I got the error:

error while loading shared libraries: libstdc++.so.5: cannot open shared object file:No such a file or directory

I tried yum update and it updated and installed lots of things but the problem is still exist.
How can I fix it?!

Since I am very new to centOS, would you please explain your comment or solution step by step! That would be great. Thanks.

User avatar
TrevorH
Forum Moderator
Posts: 24098
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Error while loading shared libraries

Post by TrevorH » 2018/08/21 11:05:01

Please make sure you run yum update ASAP. CentOS 6.8 is old and out of date and you need to be on 6.10 to be current. Running yum update will get you there.

If you need to find things like this you can run something like yum provides '*/libstdc++.so.5*' and yum will tell you which, if any, packages match that pattern. In this case

Code: Select all

[root@c6test ~]# yum provides '*/libstdc++.so.5*'
Loaded plugins: priorities
275 packages excluded due to repository priority protections
compat-libstdc++-33-3.2.3-69.el6.i686 : Compatibility standard C++ libraries
Repo        : base
Matched from:
Filename    : /usr/lib/libstdc++.so.5
Filename    : /usr/lib/libstdc++.so.5.0.7



compat-libstdc++-33-3.2.3-69.el6.x86_64 : Compatibility standard C++ libraries
Repo        : base
Matched from:
Filename    : /usr/lib64/libstdc++.so.5
Filename    : /usr/lib64/libstdc++.so.5.0.7
So you need to yum install compat-libstdc++-33 then try again. Do the yum update first or you the install of compat-libstdc++-33 might fail.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

shahriar123
Posts: 3
Joined: 2018/08/21 10:33:30

Re: Error while loading shared libraries

Post by shahriar123 » 2018/08/22 09:33:18

Thank you, that worked!

Can you help me with something else? before running the software I have to set environment.
I have a hint according to the guide document. It is mentioned that

Add the following to the shell configuration files in your home director:
For Bourne shell, add to the .login file:
PATH = <software root directory>/bin:$PATH
export $PATH


How can I do this?!

tunk
Posts: 462
Joined: 2017/02/22 15:08:17

Re: Error while loading shared libraries

Post by tunk » 2018/08/22 17:49:07

From command line:
as root: yum install nano
as user: nano .login
If that doesn't work, try to add it to .bashrc and/or .bash_profile

Post Reply