UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 63034

PetaLinux 2014.4 - Sub-process /opt/petalinux/petalinux-v2014.2-final/tools/packagemanager/bin/dpkg returns an error code (127)

Description

When running a standard PetaLinux build process on Ubuntu 14.04 LTS x86_64 with the petalinux-build tool, the process sometimes fails to build with error messages similar to the following:

[ERROR] Errors were encountered while processing:
[ERROR] E: Sub-process /opt/petalinux/petalinux-v2014.4/tools/packagemanager/bin/dpkg returned an error code (127)
[ERROR] make[2]: *** [.pkg_stagefs] Error 255
[ERROR] make[1]: *** [sub_build_component_/none/packages-repo/single/plnx-repo] Error 2
ERROR: Failed to build linux

Solution

To confirm that this Answer Record is relevant to your issue, please consult the PetaLinux build log at <PLNX_PROJ>/build/build.log.  

The log should contain messages similar to the following referencing libselinux.so.1:

[ALL  ] Authentication warning overridden.
[ALL  ] /opt/petalinux/petalinux-v2014.4/tools/packagemanager/bin/dpkg:
error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory [ERROR] E: Sub-process /opt/petalinux/petalinux-v2014.4/tools/packagemanager/bin/dpkg
returned an error code (127)
[ERROR] make[2]: *** [.pkg_stagefs] Error 255 [ALL  ] make[2]: Leaving directory `/work/proj/Xilinx-ZC702/build/linux/rootfs/packages-repo'
[ERROR] make[1]: ***
[sub_build_component_/none/packages-repo/single/plnx-repo] Error 2 [ALL  ] make[1]: Leaving directory `/work/proj/Xilinx-ZC702/build/linux/rootfs'
[ALL  ] make: ***
[sub_build_component_/none/rootfs/single/petalinux-rootfs] Error 2 [ALL  ] make: Leaving directory `/work/proj/Xilinx-ZC702/build/linux'

 

If this Answer Record is a good match for your scenario, install the 32-bit version of SELinux by following the instructions below:

1) Enable 32-bit library support for Ubuntu 14.04 LTS:
$ sudo dpkg --add-architecture i386

2) Update the package repository:
$ sudo apt-get -y update

3) Install the 32-bit SELinux package:
$ sudo apt-get install libselinux1:i386

4) Re-run the petalinux-build operation.

AR# 63034
Date Created 12/04/2014
Last Updated 12/10/2014
Status Active
Type General Article
Tools
  • PetaLinux
  • PetaLinux - 2014.4