如何解决从apt
我想在我的交叉编译环境中安装libboost-dev-all:armhf
。我是这样开始的
sudo debootstrap stretch crossdev_folder
sudo chroot crossdev_folder
dpkg --add-architecture armhf
apt-get update
apt-get install libboost-all-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:
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.
然后我按照建议安装了libboost-graph-parallel-dev
apt-get install libboost-graph-parallel-dev:armhf
,它使我可以继续安装libboost-dev-all:armhf
。但是我遇到了这个错误
/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)
据我所知,libboost-dev-all:armhf
需要python2.7-minimal:armhf
和python-minimal:armhf
才能正常工作,因此apt会尝试将它们与boost库一起安装。但是,在安装过程中,那些损坏的软件包试图执行位于/var/lib/dpkg/info/python2.7-minimal.postinst的一些脚本,该脚本在其42行中可以执行
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
尝试将先前安装(也通过boost)安装的python2.7称为armhf,删除了先前的amd安装。因此,由于它是armhf执行程序,因此无法在amd中运行,因此会抛出Exec format error
并且一切都会失败。
有人设法从apt安装libboost-dev-all:armhf吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。