根据 minitube 作者的说法,最新版本的 minitube 需要 libmpv => 0.29.0,但存储库或通过以下方式无法提供该版本苯甲酸。ubuntu 18.04LTS 提供的是 libmpv 0.27.0 版本。
所以我认为:
如果我自己构建 libmpv,我就能构建最新版本的 minitube!!!!
因此,我安装了构建迷你管道所需的一切,但以下除外libmpv-dev
:
sudo apt install build-essential qt5-default qttools5-dev-tools qt5-qmake qtdeclarative5-dev libqt5sql5-sqlite libqt5x11extras5-dev
libmpv 的要求如下:
sudo apt-get install autoreconf lilfreetype-dev libfribidi-dev libfontconfig-dev yasm
我克隆了mpv-build
github回购. 之后我得到了以下命令序列
cd mpv-build
echo --enable-libmpv-shared > mpv_options
./use-mpv-custom v0.29.0
./update
./rebuild -j4
sudo ./install
之后我尝试在克隆 minitube github 后构建 minitube回购并给出以下命令序列:
cd mintube
qmake "DEFINES += APP_GOOGLE_API_KEY=YourAPIKeyHere"
make
但我收到以下错误:
build/obj/mpvwidget.o: In function `MpvWidget::~MpvWidget()':
mpvwidget.cpp:(.text+0x19b): undefined reference to `mpv_render_context_free'
build/obj/mpvwidget.o: In function `non-virtual thunk to MpvWidget::~MpvWidget()':
mpvwidget.cpp:(.text+0x1f7): undefined reference to `mpv_render_context_free'
build/obj/mpvwidget.o: In function `MpvWidget::initializeGL()':
mpvwidget.cpp:(.text+0x399): undefined reference to `mpv_render_context_create'
mpvwidget.cpp:(.text+0x3b9): undefined reference to `mpv_render_context_set_update_callback'
build/obj/mpvwidget.o: In function `MpvWidget::paintGL()':
mpvwidget.cpp:(.text+0x78c): undefined reference to `mpv_render_context_render'
build/obj/mpvwidget.o: In function `MpvWidget::onFrameSwapped()':
mpvwidget.cpp:(.text+0xb5): undefined reference to `mpv_render_context_report_swap'
build/obj/mpvwidget.o: In function `MpvWidget::maybeUpdate()':
mpvwidget.cpp:(.text+0x807): undefined reference to `mpv_render_context_report_swap'
collect2: error: ld returned 1 exit status
Makefile:630: recipe for target 'build/target/minitube' failed
你知道如何在 ubuntu 18.04LTS 中成功构建它吗?
答案1
libmpv => 0.29.0 (0.29.1~bionic2) 由 via 提供苯甲酸。
sudo add-apt-repository ppa:mc3man/bionic-media
sudo apt -y upgrade
答案2
您是否尝试过删除任何 libmpv 包?运行:
sudo apt-get purge libmpv-dev libmpv && sudo apt-get autoremove
然后安装声音所需的软件包:
sudo apt-get install libmp3lame-dev libx246-dev libfbdc-aac-dev
然后按照以下步骤重新编译:
cd mpv-build
echo --enable-libmpv-shared > mpv_options
# Enable sound on minitube videos
echo --enable-libx264 >> ffmpeg_options
echo --enable-libmp3lame >> ffmpeg_options
echo --enable-libfdk-aac >> ffmpeg_options
./use-mpv-custom v0.29.0
./update
./rebuild -j4
sudo ./install
还让LD_LIBRARY_PATH
to 指向/usr/local/lib
via:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
为了获得更持久的结果,请使用以下命令之一:
- 仅适用于您的本地用户:
echo "export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> ~/.profile
- 对于所有用户/全球使用:
echo "LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" | sudo tee -a /etc/environment