天天看點

runtime:symbol lookup error,:undefined symbol :stat

轉載請注明:http://blog.csdn.net/fuqiangnxn/article/details/77449136

相關文章:

https://www.experts-exchange.com/questions/25023160/executeable-relocation-error-executeable-undefined-symbol-fstat.html

https://stackoverflow.com/questions/29175308/undefined-symbol-when-loading-a-shared-library

https://stackoverflow.com/questions/32903870/symbol-lookup-error-at-runtime-instead-of-load-time

https://stackoverflow.com/questions/27054737/how-to-fix-symbol-lookup-error-undefined-symbol-errors-in-a-cluster-environment

這種問題主要原因為:沒有連接配接到動态連接配接stat的動态連接配接庫。

使用ldd及nm -D指令進行檢視。

部落客使用兩個指令發現ldd已經将所有動态庫都連接配接OK,但nm找到stat的狀态為U(undefined),最後發現編譯時使用的動态連接配接庫與運作時的動态連接配接庫不是同一版本,使其一緻後重新編譯,搞定該問題