运行可在终端中执行的代码块 [英] Running code blocks executable in terminal
本文介绍了运行可在终端中执行的代码块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我的问题在于使用共享库
我在代码块中构建和编译我的代码(在ubuntu os上)
当我通过代码块运行它时程序运行正常
但是当我想从终端运行它时我得到以下错误
hi all
My problem is in using shared library
I built and compiled my code in code blocks(on ubuntu os)
program runs okay when I run it through code blocks
but when I want to run it from terminal I am getting following error
error while loading shared libraries: libsnmp++.so.33: cannot open shared object file: No such file or directory
我尝试过:
我在/ code /和/ code / bin / Debug目录中复制.so文件但我没有得到回复
感谢您的回复
What I have tried:
I copy the .so file in both /code/ and /code/bin/Debug directory but I didn't get response
thanks for your response
推荐答案
您可以将/ usr / local / lib添加到全局搜索的库集中,如下所示:
You can add /usr/local/lib to the set of globally searched libraries as follows:
sudo echo / usr / local / lib> /etc/ld.so.conf.d/usr-local.conf
sudo echo /usr/local/lib > /etc/ld.so.conf.d/usr-local.conf
sudo / usr / sbin / ldconfig
sudo /usr/sbin/ldconfig
这篇关于运行可在终端中执行的代码块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文