Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/43.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ cmake:加载共享库时出错:libva drm.so.1,即使我安装了libva dev和libva2_C++_Linux_Cmake - Fatal编程技术网

C++ cmake:加载共享库时出错:libva drm.so.1,即使我安装了libva dev和libva2

C++ cmake:加载共享库时出错:libva drm.so.1,即使我安装了libva dev和libva2,c++,linux,cmake,C++,Linux,Cmake,在我的可执行文件的链接过程中,我得到: [ 85%] Linking CXX executable rosek_qml /usr/bin/ld: warning: libva-drm.so.1, needed by ../bin/libCTMedia_codec.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libva.so.1, needed by ../bin/libCTMedia_codec.so

在我的可执行文件的链接过程中,我得到:

[ 85%] Linking CXX executable rosek_qml
/usr/bin/ld: warning: libva-drm.so.1, needed by ../bin/libCTMedia_codec.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libva.so.1, needed by ../bin/libCTMedia_codec.so, not found (try using -rpath or -rpath-link)
[100%] Built target rosek_qml
我以前从未犯过这个错误。通常它只是拒绝完成链接。但在这种情况下,它确实结束了。为什么? 当我运行可执行文件时,我得到

./rosek_qml: error while loading shared libraries: libva-drm.so.1: cannot open shared object file: No such file or directory
即使我安装了
libva2
libvadev

这是我的CMake文件:

add_library(ctmedia_codec SHARED IMPORTED)
add_library(ctmedia_drm SHARED IMPORTED)
add_library(ctstream SHARED IMPORTED)
set_target_properties(ctmedia_codec PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../bin/libCTMedia_codec.so)
set_target_properties(ctmedia_drm PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../bin/libCTMedia_drm.so)
set_target_properties(ctstream PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../bin/libCTStream.so)

target_link_libraries(${PROJECT}
    Qt5::Widgets
    Qt5::Qml
    Qt5::Quick
    tesseract -lpthread
    ctmedia_codec
    ctmedia_drm
    ctstream
    -lva
    -lva-drm 
    )

错误是关于丢失的文件
libva.so.1
libva drm.so.1
。你真的有这些文件吗?可能是安装了
libva dev
左右的软件。Fedora,CentOS:libva→ <代码>/usr/lib64/libva drm.so.1。。。Debian,Ubuntu:libva→ <代码>/usr/lib/x86_64-linux-gnu/libva drm.so。。。但是没有
libva drm.so.1