简体   繁体   English

构建时未找到ubuntu库错误

[英]ubuntu libraries not found error when building

I have prepared a setup.py file which requires the opencv libraries contrib,core and highgui. 我已经准备了一个setup.py文件,该文件需要opencv库contrib,core和highgui。 But when I build the setup.py I get an error saying 但是当我建立setup.py时,出现错误提示

/usr/bin/ld:cannot find -lcontrib 
/usr/bin/ld:cannot find -lcore
/usr/bin/ld:cannot find -lhighgui 

I added an entry, "include /usr/local/lib" to the ld.so.conf file and ran the command ldconfig from the terminal. 我在ld.so.conf文件中添加了一个条目“ include / usr / local / lib”,并从终端运行了ldconfig命令。 Still getting the same error. 仍然出现相同的错误。 Please advice. 请指教。

The linker flags should be -lopencv_contrib , -lopencv_core and -lopencv_highgui for a standard OpenCV2.4+ install from source or when using pre-built binaries. 对于从源代码或使用预构建二进制文件进行的标准OpenCV2.4 +安装,链接器标志应为-lopencv_contrib-lopencv_core-lopencv_highgui Also make sure these libraries do exist in /usr/local/lib . 还要确保这些库确实存在于/usr/local/lib You could run ls /usr/local/lib | grep opencv 您可以运行ls /usr/local/lib | grep opencv ls /usr/local/lib | grep opencv to see if they exist. ls /usr/local/lib | grep opencv查看它们是否存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM