virtualization – Error in installing VirtualBox 7.1 on Ubuntu 24.04 LTS

I am trying to install VirtualBox 7.1 on Ubuntu 24.04 LTS

Tried apt --fix-broken

apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libcgi-fast-perl libcgi-pm-perl libevent-core-2.1-7 libevent-pthreads-2.1-7 libfcgi-bin libfcgi-perl libfcgi0ldbl libhtml-template-perl
  libprotobuf-lite23
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  virtualbox-7.1
0 upgraded, 0 newly installed, 1 to remove and 22 not upgraded.
1 not fully installed or removed.
After this operation, 227 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 330667 files and directories currently installed.)
Removing virtualbox-7.1 (7.1.4-165100~Ubuntu~noble) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for shared-mime-info (2.1-2) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...

Tried reinstalling

dpkg -i virtualbox-7.1_7.1.4-165100~Ubuntu~noble_amd64.deb 
Selecting previously unselected package virtualbox-7.1.
(Reading database ... 329919 files and directories currently installed.)
Preparing to unpack virtualbox-7.1_7.1.4-165100~Ubuntu~noble_amd64.deb ...
Unpacking virtualbox-7.1 (7.1.4-165100~Ubuntu~noble) ...
dpkg: dependency problems prevent configuration of virtualbox-7.1:
 virtualbox-7.1 depends on libc6 (>= 2.38); however:
  Version of libc6:amd64 on system is 2.35-0ubuntu3.8.
 virtualbox-7.1 depends on libcurl4t64 (>= 7.16.2); however:
  Package libcurl4t64 is not installed.
 virtualbox-7.1 depends on liblzf1 (>= 1.5); however:
  Package liblzf1 is not installed.
 virtualbox-7.1 depends on libpng16-16t64 (>= 1.6.2); however:
  Package libpng16-16t64 is not installed.
 virtualbox-7.1 depends on libqt6core6t64 (>= 6.4.0); however:
  Package libqt6core6t64 is not installed.
 virtualbox-7.1 depends on libqt6dbus6t64 (>= 6.1.2); however:
  Package libqt6dbus6t64 is not installed.
 virtualbox-7.1 depends on libqt6gui6t64 (>= 6.4.0); however:
  Package libqt6gui6t64 is not installed.
 virtualbox-7.1 depends on libqt6help6 (>= 6.2.2); however:
  Package libqt6help6 is not installed.
 virtualbox-7.1 depends on libqt6printsupport6t64 (>= 6.1.2); however:
  Package libqt6printsupport6t64 is not installed.
 virtualbox-7.1 depends on libqt6statemachine6 (>= 6.2.1); however:
  Package libqt6statemachine6 is not installed.
 virtualbox-7.1 depends on libqt6widgets6t64 (>= 6.3.0); however:
  Package libqt6widgets6t64 is not installed.
 virtualbox-7.1 depends on libqt6xml6t64 (>= 6.1.2); however:
  Package libqt6xml6t64 is not installed.
 virtualbox-7.1 depends on libssl3t64 (>= 3.0.0); however:
  Package libssl3t64 is not installed.
 virtualbox-7.1 depends on libstdc++6 (>= 13.1); however:
  Version of libstdc++6:amd64 on system is 12.3.0-1ubuntu1~22.04.
 virtualbox-7.1 depends on libtpms0 (>= 0.8.0~dev1); however:
  Package libtpms0 is not installed.
 virtualbox-7.1 depends on libvpx9 (>= 1.12.0); however:
  Package libvpx9 is not installed.
 virtualbox-7.1 depends on libxt6t64; however:
  Package libxt6t64 is not installed.

dpkg: error processing package virtualbox-7.1 (--install):
 dependency problems - leaving unconfigured
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (2.1-2) ...
Errors were encountered while processing:
 virtualbox-7.1

Read more here: Source link