How to install a newer version of libstdc++ on Centos 7
Asked Answered
R

2

8

I am running an application and it throws me an error saying:

"C++ header 'string_view' is required. You need to install a newer libstdc++ on the host system."

Can someone guide me on what I need to do to get a newer version of "libstdc++" on my machine?

Thanks

Remonstrate answered 9/2, 2021 at 2:2 Comment(1)
g++ version 7.x has like gcc73/include/c++/7.3.0/string_view. ... Earlier modern g++ versions (5.x ... 6 ) have the header string_view located in "experimental/" . .... #47176206Jugal
D
2

Try running yum provides libstdc++ to show you what package provided the library on your system. You can then check if those packages are available for update using yum list available | grep <that package> followed by yum update <that package>.

Demavend answered 15/2, 2021 at 8:11 Comment(0)
D
1

Facing the same issue, I built gcc from source. This way you get to choose your own version. It's actually pretty straightforard -- see Building GCC at https://gcc.gnu.org/wiki/InstallingGCC.

Dichromate answered 1/2, 2023 at 18:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.