导读

在安装好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 to ucal_clone_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference tou_strToLower_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucal_setMillis_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_fromUnicode_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucnv_getDefaultName_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_inDaylightTime_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucal_get_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_close_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucal_openTimeZones_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_toUnicode_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to u_strToUpper_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_close_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucnv_getMaxCharSize_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_countAvailable_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucal_getDefaultTimeZone_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference touenum_next_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucnv_getStandardName_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucol_setAttribute_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucol_strcoll_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucnv_setSubstChars_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucal_getTimeZoneDisplayName_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_openCountryTimeZones_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucnv_open_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucol_open_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucol_close_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucol_getSortKey_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucnv_getAvailableName_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_getDSTSavings_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucal_openTimeZoneIDEnumeration_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference toucal_open_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to u_errorName_54' //root/anaconda3/lib/libQt5Core.so.5: undefined reference touenum_close_54’
//root/anaconda3/lib/libQt5Core.so.5: undefined reference to ucnv_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
Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐