Can't install opencv on Jetson orin, grub-commons broken

Good day

Been trying lately to install opencv from source to enable cuDNN python complilation. When trying to compile cuda process ends with the following error log

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 os-prober : Depends: grub-common but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)

when running sudo apt install grub-common the follownig log was returned:

my_orin@localhost:~$ sudo apt install grub-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfwupdplugin5 libxmlb2
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  multiboot-doc xorriso desktop-base
The following NEW packages will be installed:
  grub-common
0 upgraded, 1 newly installed, 0 to remove and 44 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1 861 kB of archives.
After this operation, 13,4 MB of additional disk space will be used.
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 291330 files and directories currently installed.)
Preparing to unpack .../grub-common_2.04-1ubuntu26.17_arm64.deb ...
Unpacking grub-common (2.04-1ubuntu26.17) ...
dpkg: error processing archive /var/cache/apt/archives/grub-common_2.04-1ubuntu26.17_arm64.deb (--unpack):
 unable to stat './etc/grub.d' (which I was about to install): Structure needs cleaning
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/grub-common_2.04-1ubuntu26.17_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Currently i am using jetpack 5.1.1. on ubuntu 20.04 l4t release

Best regards

Hi,

The grub-common is required by the os-prober.

It doesn’t look like the OpenCV dependencies.
Could you help to confirm it? Is it possible that the package is required by other applications?

Thanks.

Good day

Doing a bit of debugging over the weekend i manage to find that in general I can’t do any apt install command even attempting to install another package returns a similar error.

Being using the following file from another nvidia forum to install Opencv which uses some apt commands to install necesary dependencies–>How do I install openCV with CUDA support? - #4 by DaneLLL

Hi,

You will need to fix the broken package from apt first.
apt will prevent you from installing other packages if there is something broken beforehand.

Maybe this link can help with your issue.

Based on the dependencies shown above, the package is not related to OpenCV installation.
Once you get it solved, you should be able to install OpenCV as well.

Thanks.

Helloo

Tried fixing it from apt but return error as i need to install first grub-commons, but to install grub commons i needed to fix apt ending in a loop

Ended up dismounting the sd card from the orin nano and running fsck on the card on another computer with ubuntu. After finishing disk repair, rebooted orin nano and managed to install grub commons

Thanks for the aid and best regards

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.