安装darknet报libQt5Core.so.5: undefined reference
导读
在安装好opencv之后,使用make安装darknet的时候报了如下错误
/usr/bin/ld: warning: libicui18n.so.54, needed by //root/anaconda3/lib/libQt5Core.so.5, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libicuuc.so.54, needed by //root/anaconda3/lib/libQt5Core.so.5, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libicudata.so.54, needed by //root/anaconda3/lib/libQt5Core.so.5, not found (try using -rpath or -rpath-link)
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_clone_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference tou_strToLower_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_setMillis_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_fromUnicode_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_getDefaultName_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_inDaylightTime_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_get_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_close_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_openTimeZones_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_toUnicode_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference tou_strToUpper_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_close_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_getMaxCharSize_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_countAvailable_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_getDefaultTimeZone_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference touenum_next_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_getStandardName_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucol_setAttribute_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucol_strcoll_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_setSubstChars_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_getTimeZoneDisplayName_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_openCountryTimeZones_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_open_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucol_open_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucol_close_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucol_getSortKey_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_getAvailableName_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_getDSTSavings_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_openTimeZoneIDEnumeration_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_open_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference tou_errorName_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference touenum_close_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_getAlias_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_compareNames_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to `ucnv_countAliases_54’
错误原因分析以及解决办法
通过undefined reference to可以看出来是由于so库的引用问题导致的,我们通过修改一下配置文件,将/root/anaconda3/lib添加到用户配置文件的目录下即可
- 解决办法
#编辑用户配置文件
vim ~/.bashrc
#将配置文件的最后添加下面一句话
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/anaconda3/lib
#让配置文件生效
source ~/.bashrc
更多推荐
所有评论(0)