Jetpack 4.2: Run command "sudo ./apply_binaries.sh" error

I am trying to flash latest Jetpack 4.2 to the xavier. When I run the command “sudo ./apply_binaries.sh”. The following error occurs:

Using rootfs directory of: /home/etdjj/prj/xavier/32.1_L4T/Linux_for_Tegra/rootfs
Extracting the NVIDIA user space components to /home/etdjj/prj/xavier/32.1_L4T/Linux_for_Tegra/rootfs
tar (child): lbzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

But I do have the “bzip2” in my ubuntu system.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
bzip2 is already the newest version (1.0.6-8).
0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.

Hi zhuce_cgf,

Are you download root file system?

sudo tar xpf JAX-TX2-Jetson_Linux_R32.1.0_aarch64.tbz2
cd Linux_for_Tegra/rootfs/
sudo tar xpf ../../JAX-TX2-Tegra_Linux_Sample-Root-Filesystem_R32.1.0_aarch64.tbz2
cd ..
sudo ./apply_binaries.sh
sudo ./flash.sh jetson-xavier mmcblk0p1

Download link: https://developer.nvidia.com/embedded/dlc/l4t-sample-root-filesystem-32-1-JAX-TX2

I have downloaded the root file system. Actually the error is “tar (child): lbzip2: Cannot exec: No such file or directory”.
For now, I replace the “apply_binaries.sh” with the old one in 31.1 to do the next step(flash.sh).

Hi zhuce_cgf,

I don’t hit this issue.
Suggest you can download the drive package and root file system again.
Thanks!

I have not yet used JetPack4.2 because my tiny laptop with Ubuntu is 14.04 (try not to laugh too hard, it is a dual atom), but I do notice libbzip2 is not available as part of the general operating system on what I have available. However, libbzip2 is present as part of gnome even on some older systems (it isn’t a part of the general linker path…this would be called only from specific gnome components if it is what I think it is). Are you using an alternative non-gnome Ubuntu 18.04?

I’m using Ubuntu 16.04 with gnome. And as I posted, bzip2 is already the newest version (1.0.6-8).

I don’t think it’s problem of drive package and root file system. Can you tell me the system version you are using? Thanks.

Hi zhuce_cgf,

My host system is Ubuntu 16.04
We are support Ubuntu Linux x64 Version 18.04 or 16.04

Thanks!

FYI, it isn’t bzip2 which it is missing…it is libbzip2. I can only assume it mentions cannot exec “lbzip2” due to using this as a dynamic library. If that isn’t the case, and if it is really wanting bzip2, then the “l” is corrupt and shouldn’t be there.

On my Fedora system there is a libbzip2 provided by Gnome. On an R28.2.1 Xavier there is no libbzip2 anywhere, but there is a libbz2, and it is in the default linker path.

As a test does the following list files without error (executed in same directory as “apply_binaries.sh”):

bunzip2 < ./nv_tegra/nvidia_drivers.tbz2 | tar --list

The “apply_binaries.sh” script is actually human readable, so it should be possible to narrow down what specific operation is causing this. Can I assume all of this was done from the “Linux_for_Tegra/” directory, and that both unpack of sample rootfs and run of “apply_binaries.sh” were run with “sudo”? Do note that the sample rootfs must be unpacked prior to apply_binaries.sh, so order of operation does matter in this case (the apply_binaries.sh step depends on the directory structure in “rootfs/” created by the sample rootfs unpack, and much of this is owned by root).

In my ubuntu 16.4, there is only “bzip2” under “/bin”, then I create a link “lbzip2” linked to “bzip2”. Then the problem is solved.

1 Like

I faced the same problem earlier, because lbzip2 library missing in your ubuntu system.

To solve it, just install lbzip2 as below.

sudo apt-get update
sudo apt-get install lbzip2

Hope it help!

2 Likes

Worked perfect — Fresh install of Ubuntu 18.04.5 LTS, nothing else. This error, and this solution. much appreciated.