簡體   English   中英

編譯C ++代碼或x264本身時找不到libx264.so.146

[英]libx264.so.146 not found while compiling C++ code or x264 itself

我剛剛將系統從Ubuntu 15.10升級到Ubuntu 16.04 LTS。 現在,由於某種原因,我的C ++項目將不再編譯。 如您在編譯日志中所見,CLion一直說它缺少'libx264.so.146:

/home/lorre851/CLion/bin/cmake/bin/cmake --build /home/lorre851/.CLion12/system/cmake/generated/ce7171e4/ce7171e4/Release --target main -- -j 8
[ 20%] Linking CXX executable build/main
/usr/bin/ld: warning: libx264.so.146, needed by /usr/local/lib/libavcodec.so.57, not found (try using -rpath or -rpath-link)
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_open_146'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_close'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_bit_depth'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_headers'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_encode'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_reconfig'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_parse'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_apply_profile'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_apply_fastfirstpass'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_levels'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_picture_init'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_default'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_default_preset'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_delayed_frames'
collect2: error: ld returned 1 exit status
CMakeFiles/main.dir/build.make:172: recipe for target 'build/main' failed
make[3]: *** [build/main] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/main.dir/all' failed
make[2]: *** [CMakeFiles/main.dir/all] Error 2
CMakeFiles/Makefile2:79: recipe for target 'CMakeFiles/main.dir/rule' failed
make[1]: *** [CMakeFiles/main.dir/rule] Error 2
Makefile:118: recipe for target 'main' failed
make: *** [main] Error 2

大多數人似乎提供“重新安裝x264”作為解決方案。 但是,在編譯x264本身時,使用以下命令重新安裝x264會導致相同的錯誤。

git clone git://git.videolan.org/x264
cd x264
./configure --enable-static
make

/usr/bin/ld: warning: libx264.so.146, needed by /usr/local/lib/libavcodec.so, not found (try using -rpath or -rpath-link)
/usr/local/lib/libavcodec.so: undefined reference to `x264_encoder_open_146'
collect2: error: ld returned 1 exit status
Makefile:202: recipe for target 'x264' failed
make: *** [x264] Error 1

有誰知道我如何解決這個問題?

好的,經過一天的嘗試刪除並重新編譯liavcodec-dev庫,但沒有結果,我決定格式化驅動器並從頭開始重新安裝Ubuntu。

現在一切正常。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM