boost - install boost armhf from apt
问题描述
I want to install libboost-dev-all:armhf
in my cross compilation environment. I started like this
sudo debootstrap stretch crossdev_folder
sudo chroot crossdev_folder
dpkg --add-architecture armhf
apt-get update
apt-get install libboost-all-dev:armhf
then I got this
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:
libboost-all-dev:armhf : Depends: libboost-graph-parallel-dev:armhf but it is not going to be installed
Depends: libboost-mpi-dev:armhf but it is not going to be installed
Depends: libboost-mpi-python-dev:armhf but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Then I installed libboost-graph-parallel-dev
as suggested
apt-get install libboost-graph-parallel-dev:armhf
and it allowed me to continue with the installation of libboost-dev-all:armhf
. However I got this error
/var/lib/dpkg/info/python2.7-minimal.postinst: 42: /var/lib/dpkg/info/python2.7-minimal.postinst: python2.7: Exec format error
dpkg: error processing package python2.7-minimal:armhf (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of python-minimal:armhf:
python-minimal:armhf depends on python2.7-minimal (>= 2.7.13-1~); however:
Package python2.7-minimal:armhf is not configured yet.
dpkg: error processing package python-minimal:armhf (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python2.7-minimal:armhf
python-minimal:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)
So as I understand libboost-dev-all:armhf
requires python2.7-minimal:armhf
and python-minimal:armhf
to work, so apt tries to install them together with boost libraries. However, during their installation, those broken packages are trying to execute some script situated at /var/lib/dpkg/info/python2.7-minimal.postinst, which is a shell script that in its 42 line does
if [ -n "$files" ]; then
python2.7 -E -S /usr/lib/python2.7/py_compile.py $files
^^^^^^^^^
if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config; then
python2.7 -E -S -O /usr/lib/python2.7/py_compile.py $files
fi
else
trying to call python2.7 which is previously installed (also by boost) as armhf, removing the previous installation for amd. In consequence, as it is an armhf exec it cannot run in amd so it throws an Exec format error
and everything fails.
Has somebody managed to install libboost-dev-all:armhf from apt?
解决方案
推荐阅读
- angular - 如何在 Angular 通用 Httpclient Xhr 调用中设置“Referer”标头?
- wicket - 调用另一个按钮的onSubmit方法
- c# - 使用 System.Text.Json 展平对象
- rust - 如何在 Rust 中的定位索引处获取位值?
- python - 我必须修改错误的代码。但是我卡在下面的部分,我在 python 中遇到了这个错误
- reactjs - 如何在不将类应用于每个元素的情况下更改单个反应组件中所有 Material UI Typography 组件的样式?
- arrays - 使数组的对和相等的最小操作数
- excel - 为“#VALUE!”的 Cell.Value 抛出类型不匹配做准备 在 Visual Basic 宏中
- dom - Javascript DOM 寻址到子窗口 DOM 元素
- android - 为什么片段的背景设置为某种颜色时工具栏会消失?