添加LD_LIBRARY_PATH和include路径

vim /etc/ls.so.conf

  添加lib路径即可:比如  /opt/xxx/xxx/xxlib/           --------这里一定要写到lib/路径   之前坑苦了我   写到了上一层。。。。ldconfig搞了一天

vim /etc/profile

  添加include的路径

  export C_INCLUDE_PATH=XXXXXX

source xxx

ldconfig   刷新cache中的lib路径

有时候,不小心知道了一些事,才发现自己所在乎的事是那么可笑。
原文地址:https://www.cnblogs.com/axjlxy/p/15189294.html