./pdffigures/pdffigures: /usr/lib/x86_64-linux-gnu/libstdc++.so.6:version `GLIBCXX_3.4.20' not found
2015-07-02 16:58
525 查看
./pdffigures/pdffigures:/usr/lib/x86_64-linux-gnu/libstdc++.so.6:version`GLIBCXX_3.4.20'notfound
https://developer.ibm.com/answers/questions/184266/libstdcso6-version-glibcxx-3420-not-found.html
Hi<Soundslikelinkerissue,Pleasesuggestionsmadein
https://gcc.gnu.org/onlinedocs/libstdc++/faq.html
3.4.
HowdoIinsurethatthedynamicallylinkedlibrarywillbefound?
Dependingonyourplatformandlibraryversion,theerrormessagemightbesimilartooneofthefollowing:
[/code]
Thisdoesn'tmeanthatthesharedlibraryisn'tinstalled,onlythatthedynamiclinkercan'tfindit.Whenadynamically-linkedexecutableisrunthelinkerfindsandloadstherequiredsharedlibrariesbysearchingapre-configuredlistofdirectories.If
thedirectorywhereyou'veinstalledlibstdc++isnotinthislistthenthelibrarieswon'tbefound.
Ifyoualreadyhaveanolderversionoflibstdc++installedthentheerrormightlooklikeoneofthefollowinginstead:
[/code]
Thismeansthelinkerfound/usr/lib/libstdc++.so.6butthatlibrarybelongstoanolderversionofGCCthanwasusedtocompileandlinktheprograma.out(orsomepartofit).Theprogramdependsoncodedefinedinthenewerlibstdc++thatbelongstothe
newerversionofGCC,sothelinkermustbetoldhowtofindthenewerlibstdc++sharedlibrary.
ThesimplestwaytofixthisistousetheLD_LIBRARY_PATHenvironmentvariable,whichisacolon-separatedlistofdirectoriesinwhichthelinkerwillsearchforsharedlibraries:
[/code]
Heretheshellvariable${prefix}isassumedtocontainthedirectoryprefixwhereGCCwasinstalledto.Thedirectorycontainingthelibrarymightdependonwhetheryouwantthe32-bitor64-bitcopyofthelibrary,soforexamplewouldbe${prefix}/lib64
onsomesystems.Theexactenvironmentvariabletousewilldependonyourplatform,e.g.DYLD_LIBRARY_PATHforDarwin,LD_LIBRARY_PATH_32/LD_LIBRARY_PATH_64forSolaris32-/64-bit,andSHLIB_PATHforHP-UX.
Seethemanpagesforld,lddandldconfigformoreinformation.Thedynamiclinkerhasdifferentnamesondifferentplatformsbutthemanpageisusuallycalledsomethingsuchasld.so,rtldordld.so.
UsingLD_LIBRARY_PATHisnotalwaysthebestsolution,FindingDynamicorSharedLibrariesinthemanualgivessomealternatives.
prefix,Iuseinubuntu64,/usr/local/lib64/,success
Hi<Soundslikelinkerissue,Pleasesuggestionsmadein
3.4.
HowdoIinsurethatthedynamicallylinkedlibrarywillbefound?
Dependingonyourplatformandlibraryversion,theerrormessagemightbesimilartooneofthefollowing:
./a.out:errorwhileloadingsharedlibraries:libstdc++.so.6:cannotopensharedobjectfile:Nosuchfileordirectory
/usr/libexec/ld-elf.so.1:Sharedobject"libstdc++.so.6"notfound
[/code]
Thisdoesn'tmeanthatthesharedlibraryisn'tinstalled,onlythatthedynamiclinkercan'tfindit.Whenadynamically-linkedexecutableisrunthelinkerfindsandloadstherequiredsharedlibrariesbysearchingapre-configuredlistofdirectories.If
thedirectorywhereyou'veinstalledlibstdc++isnotinthislistthenthelibrarieswon'tbefound.
Ifyoualreadyhaveanolderversionoflibstdc++installedthentheerrormightlooklikeoneofthefollowinginstead:
./a.out:/usr/lib/libstdc++.so.6:version`GLIBCXX_3.4.20'notfound
./a.out:/usr/lib/libstdc++.so.6:version`CXXABI_1.3.8'notfound
[/code]
Thismeansthelinkerfound/usr/lib/libstdc++.so.6butthatlibrarybelongstoanolderversionofGCCthanwasusedtocompileandlinktheprograma.out(orsomepartofit).Theprogramdependsoncodedefinedinthenewerlibstdc++thatbelongstothe
newerversionofGCC,sothelinkermustbetoldhowtofindthenewerlibstdc++sharedlibrary.
ThesimplestwaytofixthisistousetheLD_LIBRARY_PATHenvironmentvariable,whichisacolon-separatedlistofdirectoriesinwhichthelinkerwillsearchforsharedlibraries:
exportLD_LIBRARY_PATH=${prefix}/lib:$LD_LIBRARY_PATH
[/code]
Heretheshellvariable${prefix}isassumedtocontainthedirectoryprefixwhereGCCwasinstalledto.Thedirectorycontainingthelibrarymightdependonwhetheryouwantthe32-bitor64-bitcopyofthelibrary,soforexamplewouldbe${prefix}/lib64
onsomesystems.Theexactenvironmentvariabletousewilldependonyourplatform,e.g.DYLD_LIBRARY_PATHforDarwin,LD_LIBRARY_PATH_32/LD_LIBRARY_PATH_64forSolaris32-/64-bit,andSHLIB_PATHforHP-UX.
Seethemanpagesforld,lddandldconfigformoreinformation.Thedynamiclinkerhasdifferentnamesondifferentplatformsbutthemanpageisusuallycalledsomethingsuchasld.so,rtldordld.so.
UsingLD_LIBRARY_PATHisnotalwaysthebestsolution,FindingDynamicorSharedLibrariesinthemanualgivessomealternatives.
prefix,Iuseinubuntu64,/usr/local/lib64/,success
相关文章推荐
- linux下查看进程和端口
- ubuntu文件管理常用命令 分类: linux ubuntu 学习笔记 2015-07-02 16:57 29人阅读 评论(0) 收藏
- Linux下硬链接和软链接的区别
- Linux sssd 认证
- Linux sssd 认证
- 解决linux下mysql登录提示1045错误
- 在Linux的命令行中操作屏幕录制的方法
- Linux系统中设置保护眼睛的工作区背景色
- Linux下MySQL的操作
- Linux下mysql源码安装
- Linux IPC总结
- linux小操作-两个命令
- linux常用命令加实例大全
- 每天一个linux命令之ping命令
- Linux系统中Starting pptpd无法运行的解决办法
- linux常用命令
- Linux.CommanlineTool.grep
- CentOS 修改主机名
- linux ./configure 的参数详解
- Linux Centos 6 rpm 安装Mysql-5.6.25