1

I have a server CentOS 6.9 with interworx and I can't install libstdc++-static.
When I do sudo yum install -y libstdc++-static

returns with:

No package libstdc++-static available.

How can I install this package without breaking anything?

1

For Centos 6.9 you need to install libstdc++-devel package:

$ rpm -qpl libstdc++-devel-4.4.7-18.el6.x86_64.rpm | grep .a$
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/libstdc++.a # (statically linked library)
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/libsupc++.a # (statically linked library)
  • With sudo yum install -y libstdc++-devel I get Package libstdc++-devel-4.4.7-18.el6_9.2.x86_64 already installed and latest version Nothing to do – kpuccino May 17 '18 at 13:19
  • You have installed static libraries. Are you sure that problem in libstdc++-static? – Yurij Goncharuk May 17 '18 at 13:26
  • Sorry for my ignorance, I was trying to compile some program and got cc1plus: error: unrecognized command line option "-std=c++11" my gcc version is 4.4.7 – kpuccino May 17 '18 at 13:58
  • Support of c++11 begins from gcc-4.7. More info in stackoverflow.com/a/23523710/4688800. You can redefine build flag during configure step and set -std=gnu++0x or install(build) new gcc version instead. – Yurij Goncharuk May 17 '18 at 14:11
  • 1
    Especially for this cases I recommend to you use Docker. Please see in this destination. It may decrease headache during build this application. Hope it's will be helpful for you. – Yurij Goncharuk May 17 '18 at 14:47

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.