无法安装具有未满足依赖关系的 armhf 软件包

无法安装具有未满足依赖关系的 armhf 软件包

我正在尝试设置一个多架构环境来交叉编译 armhf 板。我遵循的步骤非常简单。

  1. 在 VirtualBox 上安装 ubuntu-18.04.1-desktop-amd64。
  2. sudo dpkg --add-architecture armhf
  3. vim /etc/apt/sources.list并添加关注。
deb [arch=armhf] http://ports.ubuntu.com/ trusty main universe 
   
deb-src [arch=armhf] http://ports.ubuntu.com/ trusty main universe
[And put [arch=i386,amd64] for the other lines.]
  1. sudo apt update
  2. sudo apt install libgstreamer1.0-dev:armhf

安装失败,出现以下错误。

sudo apt install libgstreamer1.0-dev:armhf
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 libgstreamer1.0-dev:armhf : Depends: libgstreamer1.0-0:armhf (= 1.14.0-1) but it is not going to be installed
                             Depends: libc6-dev:armhf but it is not going to be installed or
                                      libc-dev:armhf
                             Depends: libglib2.0-dev:armhf but it is not going to be installed
                             Depends: libc6:armhf (>= 2.4) but it is not going to be installed
                             Depends: libglib2.0-0:armhf (>= 2.40) but it is not going to be installed
                             Depends: gir1.2-gstreamer-1.0:armhf (= 1.14.0-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我进行了一些搜索并尝试了以下方法,但没有帮助。

  1. sudo apt -f install
  2. 尝试手动安装缺少的依赖包,但它是递归的。我的意思是,如果我这样做sudo apt install gir1.2-gstreamer-1.0:armhf,它会失败,因为未满足依赖性libgstreamer1.0-0:armhf

任何建议都将不胜感激!谢谢。

答案1

我认为您的软件需要更新。

  • 首先,运行以下命令来升级 Ubuntu 系统。
sudo apt 更新 && sudo apt 升级
  • 仍有问题?

您需要安装最新版本的Ubuntu 20.04 LTS

答案2

对于那些面临同样问题的人,我建议使用 Debian 进行 armhf 交叉编译。它运行得很好。

  1. VirtualBox 上的 Debian 10.7.0-amd64
  2. sudo dpkg --add-architecture armhf
  3. sudo apt update
  4. sudo apt install libgstreamer1.0-dev:armhf作品。

例子:https://github.com/kwoolytech/AmazonKinesisProducerCpp

相关内容