問題
./test: error while loading shared libraries: libcyusbserial.so: cannot open shared object file: No such file or directory
解決策1
# echo “/home/root/workspace/cyusblib” >> /etc/ld.so.conf # 把库的路径添加到ld.so.conf文件末尾
# ldconfig # 使之生效
解決策2:
LD_LIBRARY_PATH環境変数を構成します
解決策3:
ライブラリをシステムディレクトリの
/ usr / lib
/ usr / local / libに配置します
総括する
それぞれの方法には長所と短所があります。最後にソリューション1を使用して問題を解決したときは、通常、ソリューション2を使用します。スキーム3はめったに使用されません。
https://blog.csdn.net/guotianqing/article/details/106804065