我正在尝试设置一个多架构环境来交叉编译 armhf 板。我遵循的步骤非常简单。
- 在 VirtualBox 上安装 ubuntu-18.04.1-desktop-amd64。
sudo dpkg --add-architecture armhf
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.]
sudo apt update
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.
我进行了一些搜索并尝试了以下方法,但没有帮助。
sudo apt -f install
- 尝试手动安装缺少的依赖包,但它是递归的。我的意思是,如果我这样做
sudo apt install gir1.2-gstreamer-1.0:armhf
,它会失败,因为未满足依赖性libgstreamer1.0-0:armhf
任何建议都将不胜感激!谢谢。
答案1
答案2
对于那些面临同样问题的人,我建议使用 Debian 进行 armhf 交叉编译。它运行得很好。
- VirtualBox 上的 Debian 10.7.0-amd64
sudo dpkg --add-architecture armhf
sudo apt update
sudo apt install libgstreamer1.0-dev:armhf
作品。