Programing

/usr/lib/libstdc++.so.6 : 버전`GLIBCXX_3.4.15 '를 찾을 수 없음

crosscheck 2020. 7. 1. 08:09
반응형

/usr/lib/libstdc++.so.6 : 버전`GLIBCXX_3.4.15 '를 찾을 수 없음


우분투에서 GLIBCXX_3.4.15를 어떻게 얻을 수 있습니까? 컴파일중인 일부 프로그램을 실행할 수 없습니다.

내가 할 때 :

strings /usr/lib/libstdc++.so.6 | grep GLIBC

나는 얻다:

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.4
GLIBC_2.3.4
GLIBC_2.3.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

도움을 주셔서 감사합니다!


소스에서 gcc 4.6을 컴파일하고 있으며 분명히

sudo make install 

이것을 잡지 않았다. 나는 파고 발견

gcc/trunk/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.15

나는 그것을 / usr / lib에 복사하고 libstdc ++. so.6를 새로운 것을 가리 키도록 리디렉션했으며 이제는 모든 것이 작동합니다.


실행 파일을 연결할 때 libstdc ++를 g ++로 보낸이 매개 변수와 정적으로 연결하여 과거 에이 문제를 피했습니다.

-static-libstdc++

라이브러리에서 정적으로 링크하는 것이 옵션 인 경우 아마도 가장 빠른 해결 방법 일 것입니다.


clang이 작동하도록 노력하고 있었으며 (6.0.15도 필요함) 파고들 때에 설치되어 있음을 알았습니다 /usr/local/lib/libstdc++.so.6.0.15. 흑연 (실험용 gcc 버전)을 설치할 때 설치되었습니다.

해당 위치의 라이브러리에 액세스해야하는 경우 다음 LD_LIBRARY_PATH과 같이 정의해야합니다 .

export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64

이 작업을 수행 한 후 일을 할 수있었습니다. 그것이 누군가에게 도움이되기를 바랍니다.


matlab eng을 사용하여 c 코드에서 m 함수를 호출하려고 할 때이 문제가 발생합니다. 명령으로 발생mex -f .. ..

내 해결책 :

strings /usr/lib/i386-<tab>/libstdc++.so.6 | grep GLIBC

3.4.15가 포함되어 있음을 발견했습니다.

그래서 내 시스템에는 최신 라이브러리가 있습니다.

문제는 matlab 자체에서 발생하며 자체 libstdc ++. so.6을 호출합니다. {MATLAB}/bin

업데이트 된 시스템 라이브러리로 바꾸십시오.


같은 오류가 발생했습니다. 이것이 나를 위해 일한 방법입니다.

  • 현재 설치된 gcc에서 프로젝트를 청소했습니다.
  • 그것을 다시 컴파일

완벽하게 일했습니다!


For this error, I copied the latest libstdc++.so.6.0.17 from other server, and removed the soft link and recreated it.

1. Copy the the libstdc++.so.6.0.15 or latest from other server to the affected system.
In my case SUSE linux 11 SP3 had latest.
2. rm libstdc++.so.6
3. ln -s libstdc++.so.6.0.17 libstdc++.so.6 (under /usr/lib64 directory).

nJoy


gcc version 4.8.1, the error seems like:

/root/bllvm/build/Release+Asserts/bin/llvm-tblgen: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /root/bllvm/build/Release+Asserts/bin/llvm-tblgen)

I found the libstdc++.so.6.0.18 at the place where I complied gcc 4.8.1

Then I do like this

cp ~/objdir/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.18 /usr/lib64/

rm /usr/lib64/libstdc++.so.6

ln -s libstdc++.so.6.0.18 libstdc++.so.6

problem solved.


I have just faced with similar issue building LLVM 3.7 version. first check whether you have installed the required library on your system:

$locate libstdc++.so.6.*

Then add the found location to your $LD_LIBRARY_PATH environment variable.


I've extracted them from an RPM (RPM for libstdc++) and then:

export LD_LIBRARY_PATH=.

To set the system to search for the libraries on the current directory. Then just executed my program. But in my case I've received a single executable that I needed, it wasn't a system wide change.


Sometimes you don't control the target machine (e.g. your library needs to run on a locked-down enterprise system). In such a case you will need to recompile your code using the version of GCC that corresponds to their GLIBCXX version. In that case, you can do the following:

  1. Look up the latest version of GLIBCXX supported by the target machine: strings /usr/lib/libstdc++.so.6 | grep GLIBC ... Say the version is 3.4.19.
  2. Use https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html to find the corresponding GCC version. In our case, this is [4.8.3, 4.9.0).

I've had a similar issue, and I've resolved it by statically linking libstdc++ into the program I was compiling, like so:

$ LIBS=-lstdc++ ./configure ... etc.

instead of the usual

$ ./configure ... etc.

There might be problems with this solution to do with loading shared libraries at runtime, but I haven't looked into the issue deeply enough to comment.


I had the same problem before, and fixed that, the steps could be found on this Fixing error "GLIBCXX_3.4.15" on matlab


Bug with GLIBCXX_3.4.14 You need to install a newer version of GCC. http://pkgs.org/download/libstdc++.so.6 goto:

http://geeksterminal.com/how-to-install-glib-glibc/1392/

and follow instructions.


I had the same problem because I changed the user from myself to someone else:

su

For some reason, after did the normal compiling I was not able to execute it (the same error message). Directly ssh to the other user account works.


I had multiple versions of the gcc compiler installed and needed to use a more recent version than the default installation. Since I am not a system administrator for our Linux systems, I cannot just change /usr/lib or many of the other suggestions above. I was encountering this problem and eventually tracked it down to setting my path to the 32-bit library directory instead of the 64-bit library (lib64) directory. Since the libraries in the 32-bit directory were incompatible, the system defaulted to the older version which was out of date.

Using -L to the path I was referencing gave warnings about "skipping incompatible libstdc++.so when searching for -lstdc++". This was the hint that helped me finally resolve the problem.


Same thing with gcc version 4.8.1 (GCC) and libstdc++.so.6.0.18. Had to copy it here /usr/lib/x86_64-linux-gnu on my ubuntu box.


In my case LD_LIBRARY_PATH had /usr/lib64 first before /usr/local/lib64. (I was builing llvm 3.9).
The new gcc compiler that I installed to compile llvm 3.9 had libraries using newer GLIBCXX libraries under /usr/local/lib64 So I fixed LD_LIBRARY_PATH for the linker to see /usr/local/lib64 first.
That solved this problem.


I just used -static-libstdc++ while building. w/ that, I can run the a.out

g++ test.cpp -static-libstdc++

참고URL : https://stackoverflow.com/questions/5216399/usr-lib-libstdc-so-6-version-glibcxx-3-4-15-not-found

반응형