无法在 Ubuntu 18.04 上找到软件包 libgstreamer0.10-dev

Mat*_*eão 7 package-management apt opencv 18.04

我正在尝试按照此处的说明安装 OpenCV4:https ://www.learnopencv.com/install-opencv-4-on-ubuntu-16-04/

当我到达

sudo apt -y install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
Run Code Online (Sandbox Code Playgroud)

我收到

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libgstreamer0.10-dev
E: Couldn't find any package by glob 'libgstreamer0.10-dev'
E: Couldn't find any package by regex 'libgstreamer0.10-dev'
E: Unable to locate package libgstreamer-plugins-base0.10-dev
E: Couldn't find any package by glob 'libgstreamer-plugins-base0.10-dev'
E: Couldn't find any package by regex 'libgstreamer-plugins-base0.10-dev'
Run Code Online (Sandbox Code Playgroud)

我在网上查了一下,这些包可以在https://packages.ubuntu.com/search?keywords=libgstreamer0.10-dev 找到

我尝试手动下载和安装

sudo apt install ./libgstreamer0.10-dev_0.10.36-1.5ubuntu1_amd64.deb
Run Code Online (Sandbox Code Playgroud)

这给了我

Note, selecting 'libgstreamer0.10-dev' instead of './libgstreamer0.10-dev_0.10.36-1.5ubuntu1_amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgstreamer0.10-dev : Depends: libgstreamer0.10-0 (= 0.10.36-1.5ubuntu1) but it is not installable
                        Depends: libglib2.0-dev but it is not installable
                        Depends: libxml2-dev but it is not installable
                        Depends: gir1.2-gstreamer-0.10 (= 0.10.36-1.5ubuntu1) but it is not installable
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)

我是 Ubuntu 的新手(只使用过 Manjaro)。我不明白为什么 apt 无法找到网站上的包裹。

Oli*_*jon 10

libgstreamer0.10-dev 在 Ubuntu 18.04 中已过时。

因此,请改用较新的版本:

sudo apt install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
Run Code Online (Sandbox Code Playgroud)

这肯定会奏效。