Install produces inconsistent set of packages.

I am trying to install 4.2.1 (rev2) on a TX2i becuase that is the closest version to what is installed on some other systems I have built.

After installing, there seems to be an inconsistent set of packages installed that cause most “apt install” commands to fail. For example:

sudo apt  install libopenmpi-dev
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:
 libopenmpi-dev : Depends: libibverbs-dev (>= 1.1.7) but it is not going to be installed
                  Depends: libhwloc-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

There are no “held” packages, and “sudo apt update && sudo apt upgrade” does not fix the problem.

Any ideas ?

  • Bob

hello bobb0371,

it seems a dependency issue, may I know had you install other packages before manually?
please have a try to execute auto-remove to fix the issue.

$ sudo apt autoremove

I’m able to install libopenmpi-dev, you may also refer to below additional packages.
for example,

The following additional packages will be installed:
  ibverbs-providers libhwloc-dev libhwloc-plugins libhwloc5 libibverbs-dev libibverbs1 libnuma-dev libnuma1
  libopenmpi2 ocl-icd-libopencl1 openmpi-bin openmpi-common
Suggested packages:
  libhwloc-contrib-plugins openmpi-doc opencl-icd gfortran
The following NEW packages will be installed:
  libhwloc-dev libhwloc-plugins libhwloc5 libibverbs-dev libnuma-dev libopenmpi-dev libopenmpi2 ocl-icd-libopencl1
  openmpi-bin openmpi-common
The following packages will be upgraded:
  ibverbs-providers libibverbs1 libnuma1
3 upgraded, 10 newly installed, 0 to remove and 186 not upgraded.
Need to get 3494 kB of archives.

No, this error happens while running the Jetson SDK installer, before I have done any manual installs. I tried autoremove and it did not help.

Here I am 3 weeks later and I can’t install a new Jetson. I am so frustrated I am looking for another hardware platform to base our products on.

  • Bob

Note that you have a dev package installed, libopenmpi-dev. This depends on libibverbs-dev. The problem isn’t that there are package conflicts, but instead that the Ubuntu repositories for dev packages have not been set as available to the apt software manager program. This isn’t specific to this hardware, but is specific for most Linux distributions with package tools.

What follows is more or less a search for finding the repository. The process helps with understanding Ubuntu repositories. This is the URL for libopenmpi-dev:
…this is the URL for download of arm64:
…this is the URL for
…this is the URL for download of arm64:

Ubuntu itself comes with several repositories enabled. Dev packages are by default not installed…on the other hand, if a repo is not enabled for the relevant package, this will stop apt from finding them automatically when they are needed. If you know where the libibverbs-dev package is available, then you could manually install this if there are no conflicts. Otherwise you’ll need to find the repository which features this, and enable that repo. Since libopenmpi is not a default package I’m thinking perhaps you installed this via some other process. You wouldn’t have seen the “-dev” requirement until you triggered something needing to update this. This in itself may have conflicts which are not part of the base Ubuntu install. Note, from one of my Jetsons, after “sudo -s”:

root@x2:~# apt search libopenmpi-dev
Sorting... Done
Full Text Search... Done
libopenmpi-dev/bionic 2.1.1-8 arm64
  high performance message passing library -- header files

root@x2:~# apt search libibverbs-dev
Sorting... Done
Full Text Search... Done
libibverbs-dev/bionic-updates 17.1-1ubuntu0.2 arm64
  Development files for the libibverbs library

As long as there are no conflicts (and I am not installing openmpi), you could:
sudo apt update

sudo apt-get install libopenmpi-dev libibverbs-dev

…and let us know what shows up. There might or might not be a conflict.

More On Repositories…

I’m not certain of what the correct method is for adding the right repository for any specific package, but if you look at “/etc/apt/sources.list” (human readable), then you’ll see some repos which are commented out, and others which are left inert via commenting. The source packages are the “deb-src” listings, but the “-dev” packages do not require this. The “-dev” packages are headers, the “-src” packages are full source code. Source code requires the “deb-src”, headers do not.

Each of those repos will show a URL, and then a subdirectory of the repo server (you can use your web browser to go to those URLs…the apt software does this, and then looks for what follows in the space-delimited word list). As an example, if the URL is followed by “bionic” and “universe”, then this refers to the URL:

Any package in a subdirectory of this (or listed from unpacking source manifests) comes from this repository and that release (“bionic” is a release, “bionic-backports” is a future release back ported to bionic, “bionic-security” is a security release, so on). Licensing may differ, and update availability or testing, based on “main” versus “universe” versus “multiverse”, so on. You have to find the “-dev” package among those to know which server if you are just using a web browser.

To make life easier, this is to find dependencies of a package:

apt-cache rdepends --installed the_package_name

(leave out the “–installed” if you want to see all methods of fulfilling a dependency)

To see what package owns a file:

dpkg -S /where/ever/that/file/is

I think you ran into a conflict somewhere due to openmpi, but do post what you see when you attempt:

sudo apt update
sudo apt-get install libibverbs-dev

If libibverbs-dev can be found, then you can continue. However, this might in itself have other dependencies. I don’t know what all of those dependencies are since I’ve not installed OpenMPI. If a repository not being enabled is the root of this, then enabling that repository should result in being able to automatically install everything.

Thank you for the advice. I will use this info if it happens again. Yesterday I re-flashed from the SDK and the problem is not occurring now. I used the EXACT sames steps that had failed several times the week before XMas, so I really think it was a temporary bad state on a repo server. The failures would occur before I had done any manual installs, with the debian packages installed by the SDK via SSH to the target.